mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Build: Use imported target JsonCpp::JsonCpp instead of variables
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user