mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-26 10:41:03 +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,3 +1,4 @@
|
|||||||
|
if (NOT TARGET JsonCpp::JsonCpp)
|
||||||
if (TARGET jsoncpp_static)
|
if (TARGET jsoncpp_static)
|
||||||
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
||||||
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_static")
|
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_static")
|
||||||
@ -5,3 +6,4 @@ elseif (TARGET jsoncpp_lib)
|
|||||||
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
||||||
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_lib")
|
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_lib")
|
||||||
endif ()
|
endif ()
|
||||||
|
endif ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user