mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-25 17:40:48 +08:00
Protect target JsonCpp::JsonCpp against multi-include (#1435)
* Protect target JsonCpp::JsonCpp against multi-include Fixes #1356 * Simplify (@BillyDonahue) --------- Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
This commit is contained in:
parent
48d2e106a7
commit
fa0dff18fd
@ -1,7 +1,9 @@
|
|||||||
if (TARGET jsoncpp_static)
|
if (NOT TARGET JsonCpp::JsonCpp)
|
||||||
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
if (TARGET jsoncpp_static)
|
||||||
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_static")
|
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
||||||
elseif (TARGET jsoncpp_lib)
|
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_static")
|
||||||
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
elseif (TARGET jsoncpp_lib)
|
||||||
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_lib")
|
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
||||||
endif ()
|
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_lib")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user