mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-01-31 14:39:52 +01:00
- workaround for CMake < 3.18 ALIAS target limitation to not point to non-GLOBAL IMPORTED target
This commit is contained in:
parent
a3914b792f
commit
2af4a4c6c8
@ -6,9 +6,11 @@ cmake_policy(VERSION 3.0)
|
||||
include ( "${CMAKE_CURRENT_LIST_DIR}/jsoncpp-targets.cmake" )
|
||||
|
||||
if(TARGET jsoncpp_static)
|
||||
add_library(JsonCpp::JsonCpp ALIAS 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 ALIAS jsoncpp_lib)
|
||||
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED )
|
||||
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_lib")
|
||||
endif()
|
||||
|
||||
check_required_components(JsonCpp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user