Commit 8996912c authored by Simon Giesecke's avatar Simon Giesecke

Problem: generated ZeroMQConfig.cmake does not work when only static or shared library was built

Solution: check for availability of shared/static libzmq targets
parent f41f5146
...@@ -19,7 +19,11 @@ ...@@ -19,7 +19,11 @@
if(NOT TARGET libzmq AND NOT TARGET libzmq-static) if(NOT TARGET libzmq AND NOT TARGET libzmq-static)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
get_target_property(@PROJECT_NAME@_INCLUDE_DIR libzmq INTERFACE_INCLUDE_DIRECTORIES) if (TARGET libzmq)
get_target_property(@PROJECT_NAME@_LIBRARY libzmq LOCATION) get_target_property(@PROJECT_NAME@_INCLUDE_DIR libzmq INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY libzmq-static LOCATION) get_target_property(@PROJECT_NAME@_LIBRARY libzmq LOCATION)
endif()
if (TARGET libzmq-static)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY libzmq-static LOCATION)
endif()
endif() endif()
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