mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 21:00:17 -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
|
EXPAT::EXPAT
|
||||||
LibArchive::LibArchive
|
LibArchive::LibArchive
|
||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
${CMAKE_JSONCPP_LIBRARIES}
|
JsonCpp::JsonCpp
|
||||||
${CMAKE_LIBUV_LIBRARIES}
|
${CMAKE_LIBUV_LIBRARIES}
|
||||||
${CMAKE_LIBRHASH_LIBRARIES}
|
${CMAKE_LIBRHASH_LIBRARIES}
|
||||||
${CMake_KWIML_LIBRARIES}
|
${CMake_KWIML_LIBRARIES}
|
||||||
|
|||||||
@@ -318,10 +318,9 @@ if(CMAKE_USE_SYSTEM_JSONCPP)
|
|||||||
set_property(TARGET JsonCpp::JsonCpp APPEND PROPERTY
|
set_property(TARGET JsonCpp::JsonCpp APPEND PROPERTY
|
||||||
INTERFACE_COMPILE_OPTIONS -Wno-deprecated-declarations)
|
INTERFACE_COMPILE_OPTIONS -Wno-deprecated-declarations)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_JSONCPP_LIBRARIES JsonCpp::JsonCpp)
|
|
||||||
else()
|
else()
|
||||||
set(CMAKE_JSONCPP_LIBRARIES cmjsoncpp)
|
|
||||||
add_subdirectory(Utilities/cmjsoncpp)
|
add_subdirectory(Utilities/cmjsoncpp)
|
||||||
|
add_library(JsonCpp::JsonCpp ALIAS cmjsoncpp)
|
||||||
CMAKE_SET_TARGET_FOLDER(cmjsoncpp "Utilities/3rdParty")
|
CMAKE_SET_TARGET_FOLDER(cmjsoncpp "Utilities/3rdParty")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user