File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -126,18 +126,22 @@ file(GLOB_RECURSE LIB_HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/inc
126126file (GLOB_RECURSE LIB_GENERATED_HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /include/*.h" )
127127file (GLOB_RECURSE LIB_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /src/*.cpp" )
128128
129+ # https://gitlab.kitware.com/cmake/cmake/-/issues/15415#note_334852
130+ # Warning: this will fail once nlohman_json stops being header-only!
131+ get_target_property (JSON_INCLUDE_INTERFACE nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES )
132+
129133add_library (${LIB_NAME} ${LIB_HEADERS} ${LIB_GENERATED_HEADERS} ${LIB_SOURCES} )
130134add_dependencies (${LIB_NAME} bytes tls_syntax hpke)
131135target_link_libraries (${LIB_NAME}
132- PRIVATE
133- nlohmann_json::nlohmann_json
134136 PUBLIC
135137 bytes tls_syntax hpke)
136138target_include_directories (${LIB_NAME}
137139 PUBLIC
138140 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include >
139141 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /include >
140142 $<INSTALL_INTERFACE:include /${PROJECT_NAME} >
143+ PRIVATE
144+ ${JSON_INCLUDE_INTERFACE}
141145)
142146
143147install (TARGETS ${LIB_NAME} EXPORT mlspp-targets)
You can’t perform that action at this time.
0 commit comments