mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-25 09:21:19 +08:00
fa0dff18fd
* Protect target JsonCpp::JsonCpp against multi-include Fixes #1356 * Simplify (@BillyDonahue) --------- Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
10 lines
431 B
CMake
10 lines
431 B
CMake
if (NOT TARGET JsonCpp::JsonCpp)
|
|
if (TARGET jsoncpp_static)
|
|
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
|
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_static")
|
|
elseif (TARGET jsoncpp_lib)
|
|
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
|
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_lib")
|
|
endif ()
|
|
endif ()
|