diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 920dcc56..398d6154 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -128,7 +128,7 @@ IF (ENABLE_BLACKMAGIC) FIND_PACKAGE(BlackMagic) IF (BLACKMAGIC_FOUND) - # Include headers (needed for compile) + # Include Blackmagic headers (needed for compile) include_directories(${BLACKMAGIC_INCLUDE_DIR}) # define a global var (used in the C++) @@ -140,10 +140,17 @@ ENDIF (ENABLE_BLACKMAGIC) ################### ZEROMQ ##################### # Find ZeroMQ library (used for socket communication & logging) -FIND_PACKAGE(ZMQ REQUIRED) + +# Some platforms package the header-only cppzmq C++ bindings separately, +# others (Ubuntu) bundle them in with libzmq itself +find_package(cppzmq QUIET) +find_package(ZMQ REQUIRED) # Include ZeroMQ headers (needed for compile) include_directories(${ZMQ_INCLUDE_DIRS}) +if (cppzmq_FOUND) + include_directories(${cppzmq_INCLUDE_DIRS}) +endif() ################### RESVG ##################### # Find resvg library (used for rendering svg files) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 64249380..9c5a6f9b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -130,10 +130,17 @@ ENDIF (ENABLE_BLACKMAGIC) ################### ZEROMQ ##################### # Find ZeroMQ library (used for socket communication & logging) + +# Some platforms package the header-only cppzmq C++ bindings separately, +# others (Ubuntu) bundle them in with libzmq itself +find_package(cppzmq QUIET) FIND_PACKAGE(ZMQ REQUIRED) # Include ZeroMQ headers (needed for compile) include_directories(${ZMQ_INCLUDE_DIRS}) +if (cppzmq_FOUND) + include_directories(${cppzmq_INCLUDE_DIRS}) +endif() ################### RESVG ##################### # Find resvg library (used for rendering svg files)