File tree Expand file tree Collapse file tree 5 files changed +11
-144
lines changed
Expand file tree Collapse file tree 5 files changed +11
-144
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,7 @@ option(LIB_OPT "Compile shared libraries (ON) or static (OFF)" OFF)
44
55set (CMAKE_CXX_STANDARD 17)
66
7- # set macro-directory and find scripts
8- set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR} /cmake/" )
9-
10- # include cmake custom functions
11- set (WITH_SOURCE_TREE ON )
12- include (GroupSources)
13- include (AutoCollect)
14- include (MakeLibrary)
7+ include (${CMAKE_CURRENT_SOURCE_DIR} /cmake/MakeLibrary.cmake)
158
169set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX} /lib" )
1710
Original file line number Diff line number Diff line change @@ -13,13 +13,16 @@ if(ENABLE_XML_Parser_nlohmann_json_converter)
1313 ENABLE_XML_Parser_nlohmann_json_converter
1414 )
1515
16+
17+ if (NOT TARGET nlohmann_json::nlohmann_json)
1618 include (FetchContent)
1719 FetchContent_Declare(
1820 json_lib
1921 GIT_REPOSITORY https://github.com/nlohmann/json.git
2022 GIT_TAG v3.10.5
2123 )
2224 FetchContent_MakeAvailable(json_lib)
25+ endif ()
2326
2427 target_link_libraries (${PROJECT_SHORTNAME} PUBLIC
2528 nlohmann_json::nlohmann_json
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11function (MakeLibrary LIBRARY_NAME INCLUDE_DIR)
2- CollectSourceFiles(${CMAKE_CURRENT_SOURCE_DIR} SOURCES )
3- GroupSources(${CMAKE_CURRENT_SOURCE_DIR} )
2+ file (GLOB_RECURSE SOURCES
3+ ${CMAKE_CURRENT_SOURCE_DIR} /*.h
4+ ${CMAKE_CURRENT_SOURCE_DIR} /*.cpp
5+ )
46
57if (LIB_OPT)
68 if (WIN32 )
@@ -12,11 +14,11 @@ else()
1214 add_library (${LIBRARY_NAME} STATIC ${SOURCES} )
1315endif ()
1416
15- target_include_directories (${LIBRARY_NAME}
16- PUBLIC
17- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /${INCLUDE_DIR} >
17+ target_include_directories (${LIBRARY_NAME} PUBLIC
18+ ${CMAKE_CURRENT_SOURCE_DIR} /${INCLUDE_DIR}
1819)
1920
2021install (TARGETS ${LIBRARY_NAME} )
2122install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /${INCLUDE_DIR} / DESTINATION include /${LIBRARY_NAME} FILES_MATCHING PATTERN "*.h*" )
2223endfunction ()
24+
You can’t perform that action at this time.
0 commit comments