Wrap find_package

This commit is contained in:
Sylvain Corlay 2020-03-05 10:50:25 +01:00
parent 5999e5adc7
commit 8d731ea900

View File

@ -6,6 +6,7 @@ include (DetectCPPZMQVersion)
project(cppzmq VERSION ${DETECTED_CPPZMQ_VERSION})
if (NOT TARGET libzmq)
find_package(ZeroMQ QUIET)
# libzmq autotools install: fallback to pkg-config
@ -23,6 +24,7 @@ endif()
if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static))
message(FATAL_ERROR "ZeroMQ version not supported!")
endif()
endif()
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" ON)