diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-04-23 14:17:22 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-04-30 13:27:25 +0200 |
| commit | 29ac85d55273e83a3ada19037959ae7c7823f5b7 (patch) | |
| tree | 060870053824413937ed2752e5b8f2c791e57530 /src/lib_proj.cmake | |
| parent | 36ac12c74210083ff3d699c9a57bf8b421939483 (diff) | |
| download | PROJ-29ac85d55273e83a3ada19037959ae7c7823f5b7.tar.gz PROJ-29ac85d55273e83a3ada19037959ae7c7823f5b7.zip | |
CMake build: add a NLOHMANN_JSON_ORIGIN=auto/external/internal setting allowing to choose which nlohmann/json to use
Co-authored-by: Mike Taves <mwtoews@gmail.com>
Diffstat (limited to 'src/lib_proj.cmake')
| -rw-r--r-- | src/lib_proj.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index f4adb443..71468c87 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -293,7 +293,6 @@ include_directories(${PROJ_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_BINARY_DIR}) source_group("CMake Files" FILES CMakeLists.txt) - # Embed PROJ_LIB data files location add_definitions(-DPROJ_LIB="${CMAKE_INSTALL_PREFIX}/${DATADIR}") @@ -397,6 +396,11 @@ endif() target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) +if(NLOHMANN_JSON STREQUAL "external") + target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) + target_link_libraries(proj PRIVATE nlohmann_json::nlohmann_json) +endif() + if(TIFF_ENABLED) target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) |
