Skip to content

Commit 76b22a6

Browse files
committed
Define libzmq cmake target on FindZeroMQ to match the conan package
1 parent b063794 commit 76b22a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmake/FindZeroMQ.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,13 @@ else (ZeroMQ_LIBRARIES AND ZeroMQ_INCLUDE_DIRS)
6363
# show the ZeroMQ_INCLUDE_DIRS and ZeroMQ_LIBRARIES variables only in the advanced view
6464
mark_as_advanced(ZeroMQ_INCLUDE_DIRS ZeroMQ_LIBRARIES)
6565

66+
if(ZeroMQ_FOUND AND NOT TARGET libzmq)
67+
add_library(libzmq UNKNOWN IMPORTED)
68+
set_target_properties(libzmq PROPERTIES
69+
IMPORTED_LOCATION "${ZeroMQ_LIBRARY}"
70+
INTERFACE_INCLUDE_DIRECTORIES "${ZeroMQ_INCLUDE_DIRS}"
71+
)
72+
endif()
73+
6674
endif (ZeroMQ_LIBRARIES AND ZeroMQ_INCLUDE_DIRS)
6775
endif(ZeroMQ_FOUND)

0 commit comments

Comments
 (0)