File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -6,22 +6,24 @@ include (DetectCPPZMQVersion)
66
77project (cppzmq VERSION ${DETECTED_CPPZMQ_VERSION} )
88
9- find_package (ZeroMQ QUIET )
9+ if (NOT TARGET libzmq)
10+ find_package (ZeroMQ QUIET )
1011
11- # libzmq autotools install: fallback to pkg-config
12- if (NOT ZeroMQ_FOUND)
12+ # libzmq autotools install: fallback to pkg-config
13+ if (NOT ZeroMQ_FOUND)
1314 message (STATUS "CMake libzmq package not found, trying again with pkg-config (normal install of zeromq)" )
1415 list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /libzmq-pkg-config)
1516 find_package (ZeroMQ REQUIRED)
16- endif ()
17+ endif ()
1718
18- # TODO "REQUIRED" above should already cause a fatal failure if not found, but this doesn't seem to work
19- if (NOT ZeroMQ_FOUND)
19+ # TODO "REQUIRED" above should already cause a fatal failure if not found, but this doesn't seem to work
20+ if (NOT ZeroMQ_FOUND)
2021 message (FATAL_ERROR "ZeroMQ was not found, neither as a CMake package nor via pkg-config" )
21- endif ()
22+ endif ()
2223
23- if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static ))
24- message (FATAL_ERROR "ZeroMQ version not supported!" )
24+ if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static ))
25+ message (FATAL_ERROR "ZeroMQ version not supported!" )
26+ endif ()
2527endif ()
2628
2729if (EXISTS "${CMAKE_SOURCE_DIR} /.git" )
You can’t perform that action at this time.
0 commit comments