File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
1414 message (STATUS "${PROJECT_NAME} is top level" )
1515endif ()
1616
17- option (PLIB_ENABLE_TESTS "Enable building tests" ${is_root_project} )
18- option (PLIB_BUILD_PSCRIPT_DEMO_APP "Enable pscript demo app" ON ) # TODO: set default to off
17+ option (PSCRIPT_ENABLE_TESTS "Enable building tests" ${is_root_project} )
18+ option (PSCRIPT_BUILD_DEMO_APP "Enable pscript demo app" ON ) # TODO: set default to off
1919
2020if (${PSCRIPT_ENABLE_TESTS} )
2121 add_subdirectory (tests)
@@ -35,6 +35,11 @@ FetchContent_Declare(
3535
3636FetchContent_MakeAvailable(plib)
3737
38+ FetchContent_Declare(
39+ fmt
40+ GIT_REPOSITORY https://github.com/fmtlib/fmt
41+ )
42+ FetchContent_MakeAvailable(fmt)
3843
3944add_library (pscript STATIC )
4045target_sources (pscript PRIVATE
@@ -46,7 +51,10 @@ target_sources(pscript PRIVATE
4651)
4752target_include_directories (pscript PUBLIC "${CMAKE_CURRENT_SOURCE_DIR} /include" ${peglib_SOURCE_DIR} )
4853
49- target_compile_options (plib PRIVATE "-Wno-format" )
54+
55+ target_link_libraries (pscript PUBLIC fmt plib)
56+ target_include_directories (pscript PUBLIC ${fmt_SOURCE_DIR} /include )
57+ target_compile_options (pscript PRIVATE "-Wno-format" )
5058
5159# copy over modules to build directory
5260file (GLOB_RECURSE MODULE_FILES "modules/*" )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ FetchContent_Declare(
1010FetchContent_MakeAvailable(catch2)
1111
1212add_executable (pscript-test main.cpp)
13- target_link_libraries (pscript-test PRIVATE plib Catch2::Catch2WithMain)
13+ target_link_libraries (pscript-test PRIVATE pscript Catch2::Catch2WithMain)
1414target_compile_options (pscript-test PRIVATE -Wno-macro-redefined -Wno-format)
1515
1616if (${PSCRIPT_BUILD_DEMO_APP} )
You can’t perform that action at this time.
0 commit comments