diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-21 05:22:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-22 14:21:38 (GMT) |
commit | ddac6dcbe8029a5850377ffb9aee088d9493e2ce (patch) | |
tree | 5b3863c495c81dda7f63ea850468ac73d927b208 | |
parent | ac76c53d33e16a159d3152105e6f99f241769691 (diff) | |
download | CMake-ddac6dcbe8029a5850377ffb9aee088d9493e2ce.zip CMake-ddac6dcbe8029a5850377ffb9aee088d9493e2ce.tar.gz CMake-ddac6dcbe8029a5850377ffb9aee088d9493e2ce.tar.bz2 |
Build: Use imported target `JsonCpp::JsonCpp` instead of variables
-rw-r--r-- | Source/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Source/Modules/CMakeBuildUtilities.cmake | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index c8465a5..31d514d 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -754,7 +754,7 @@ target_link_libraries( EXPAT::EXPAT LibArchive::LibArchive ZLIB::ZLIB - ${CMAKE_JSONCPP_LIBRARIES} + JsonCpp::JsonCpp ${CMAKE_LIBUV_LIBRARIES} ${CMAKE_LIBRHASH_LIBRARIES} ${CMake_KWIML_LIBRARIES} diff --git a/Source/Modules/CMakeBuildUtilities.cmake b/Source/Modules/CMakeBuildUtilities.cmake index 51811d6..b17c7ce 100644 --- a/Source/Modules/CMakeBuildUtilities.cmake +++ b/Source/Modules/CMakeBuildUtilities.cmake @@ -318,10 +318,9 @@ if(CMAKE_USE_SYSTEM_JSONCPP) set_property(TARGET JsonCpp::JsonCpp APPEND PROPERTY INTERFACE_COMPILE_OPTIONS -Wno-deprecated-declarations) endif() - set(CMAKE_JSONCPP_LIBRARIES JsonCpp::JsonCpp) else() - set(CMAKE_JSONCPP_LIBRARIES cmjsoncpp) add_subdirectory(Utilities/cmjsoncpp) + add_library(JsonCpp::JsonCpp ALIAS cmjsoncpp) CMAKE_SET_TARGET_FOLDER(cmjsoncpp "Utilities/3rdParty") endif() |