Skip to content
Snippets Groups Projects
Commit e4f08f80 authored by Joseph Boudreau's avatar Joseph Boudreau
Browse files
parents f87bd4a7 79882f4b
Branches
Tags
No related merge requests found
Pipeline #1603892 failed
......@@ -69,12 +69,10 @@ if( GEOMODEL_USE_BUILTIN_JSON )
add_dependencies( GXClashPointSystems JSON )
endif()
message(STATUS "dir: ${nlohmann_json_INCLUDE_DIR}")
if( nlohmann_json_FOUND OR GEOMODEL_USE_BUILTIN_JSON )
# we link to nlohmann_json only if we use a version of nlohmann_json installed through CMake;
# this is not needed if the single-header library is installed in a regular
# system include folder (e.g., '/usr/local/include')
# NOTE: Needs to be PUBLIC for the built-in nlohmann_json
if( nlohmann_json_FOUND OR GEOMODEL_USE_BUILTIN_JSON )
target_link_libraries( GXClashPointSystems PUBLIC nlohmann_json::nlohmann_json )
endif()
......
......@@ -19,7 +19,7 @@ if( GEOMODEL_USE_BUILTIN_JSON )
set( nlohmann_json_INCLUDE_DIR
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONInstall/${CMAKE_INSTALL_INCLUDEDIR}" )
set( nlohmann_json_INCLUDE_DIRS "${nlohmann_json_INCLUDE_DIR}" )
message(STATUS "Installing nlohmann_json in: ${nlohmann_json_INCLUDE_DIR}")
message(STATUS "Installing the built-in 'nlohmann_json' in: ${nlohmann_json_INCLUDE_DIR}")
# Create the include directory already, otherwise CMake refuses to
# create the imported target.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment