Skip to content

Commit

Permalink
StringView: use string-view-lite implementation
Browse files Browse the repository at this point in the history
https://github.com/martinmoene/string-view-lite

* Add char_type hack for fmtlib to work in Player
* Add helper free functions
* Add install rules in lcf/third_party/string_view.hpp
  • Loading branch information
mateofio committed Aug 18, 2020
1 parent eadcda0 commit 8d6ae1f
Show file tree
Hide file tree
Showing 5 changed files with 1,585 additions and 299 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ set(LCF_HEADERS
src/generated/lcf/rpg/trooppage.h
src/generated/lcf/rpg/trooppagecondition.h
src/generated/lcf/rpg/variable.h
src/lcf/third_party/string_view.h
)

list(TRANSFORM LCF_SOURCES PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/)
Expand All @@ -292,7 +293,7 @@ list(APPEND LCF_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/src/lcf/config.h)
target_sources(lcf PRIVATE ${LCF_SOURCES} PUBLIC ${LCF_HEADERS})

# IDE source grouping
foreach(SG LDB LMT LMU LSD RPG)
foreach(SG LDB LMT LMU LSD RPG THIRD_PARTY)
string(TOLOWER ${SG} LSG)
source_group("Source Files\\generated\\${SG}" REGULAR_EXPRESSION "generated/${LSG}_.*\\.cpp")
source_group("Header Files\\generated\\${SG}" REGULAR_EXPRESSION "generated/lcf/${LSG}/.*\\.h")
Expand Down Expand Up @@ -389,7 +390,7 @@ install(
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

set(LCF_INSTALL_HEADERS ${LCF_HEADERS})
foreach(S ldb lmt lmu lsd rpg)
foreach(S ldb lmt lmu lsd rpg third_party)
set(SUBDIR_HEADERS ${LCF_INSTALL_HEADERS})
list(FILTER SUBDIR_HEADERS INCLUDE REGEX "/${S}/")
install(FILES ${SUBDIR_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lcf/${S})
Expand Down
4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ lcflmtincludedir = $(includedir)/lcf/lmt
lcflmuincludedir = $(includedir)/lcf/lmu
lcflsdincludedir = $(includedir)/lcf/lsd
lcfrpgincludedir = $(includedir)/lcf/rpg
lcfthirdpartyincludedir = $(includedir)/lcf/third_party

lib_LTLIBRARIES = liblcf.la
liblcf_la_CPPFLAGS = \
Expand Down Expand Up @@ -300,6 +301,9 @@ lcfrpginclude_HEADERS = \
src/generated/lcf/rpg/trooppagecondition.h \
src/generated/lcf/rpg/variable.h

lcfthirdpartyinclude_HEADERS = \
src/lcf/third_party/string_view.h

nodist_lcfinclude_HEADERS = autogen/lcf/config.h

check_PROGRAMS = test_runner
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ See the source code comment headers for license details.
[#easyrpg at irc.freenode.net]: https://kiwiirc.com/nextclient/#ircs://irc.freenode.net/#easyrpg?nick=rpgguest??
[COPYING]: COPYING
[inih]: https://github.com/benhoyt/inih
[string-view-lite]: https://github.com/martinmoene/string-view-lite
Loading

0 comments on commit 8d6ae1f

Please sign in to comment.