From 8458616a3c00a093a67a505afd010769d865bdbd Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Mon, 18 Oct 2021 15:16:57 +0200 Subject: [PATCH] Rename local nlohmann_json::nlohmann_json target. Naming it same as in an externally found library. --- Applications/ApplicationsLib/CMakeLists.txt | 2 +- ProcessLib/CMakeLists.txt | 2 +- scripts/cmake/Dependencies.cmake | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index e90fb117263..a915de84662 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -23,7 +23,7 @@ if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR OGS_BUILD_TESTING) PRIVATE ParameterLib ProcessLib ) elseif(OGS_BUILD_GUI) - target_link_libraries(ApplicationsLib PRIVATE nlohmann_json) + target_link_libraries(ApplicationsLib PRIVATE nlohmann_json::nlohmann_json) endif() if(OGS_USE_LIS) diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 74178274eff..2e4ae212faa 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -35,7 +35,7 @@ target_link_libraries( NumLib $<$<TARGET_EXISTS:ProcessLibBoundaryConditionAndSourceTermPython>:ProcessLibBoundaryConditionAndSourceTermPython> $<$<TARGET_EXISTS:petsc>:petsc> - nlohmann_json + nlohmann_json::nlohmann_json PRIVATE ParameterLib GitInfoLib $<$<TARGET_EXISTS:InSituLib>:InSituLib> ) diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index 7a5c8b81b96..0775583e85c 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -307,9 +307,9 @@ CPMFindPackage( SHA256=69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf ) if(nlohmann_json_ADDED) - add_library(nlohmann_json INTERFACE IMPORTED) + add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED) target_include_directories( - nlohmann_json INTERFACE ${nlohmann_json_SOURCE_DIR} + nlohmann_json::nlohmann_json INTERFACE ${nlohmann_json_SOURCE_DIR} ) endif() -- GitLab