Commit 993e4e28 authored by Sergey Rachev's avatar Sergey Rachev Committed by Christopher Dunn
Browse files

- isolated namespace targets into separate file

No related merge requests found
Showing with 9 additions and 8 deletions
+9 -8
......@@ -186,6 +186,7 @@ if(JSONCPP_WITH_CMAKE_PACKAGE)
COMPATIBILITY SameMajorVersion)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/jsoncppConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/jsoncppConfig.cmake
${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp-namespaced-targets.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/jsoncpp)
endif()
......
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 ()
\ No newline at end of file
......@@ -4,14 +4,7 @@ cmake_policy(VERSION 3.0)
@PACKAGE_INIT@
include ( "${CMAKE_CURRENT_LIST_DIR}/jsoncpp-targets.cmake" )
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()
include ( "${CMAKE_CURRENT_LIST_DIR}/jsoncpp-namespaced-targets.cmake" )
check_required_components(JsonCpp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment