From 9b9e4a700848b339b2697d195d9bad6313e44061 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 13 Sep 2019 19:36:44 -0400 Subject: [PATCH] CMakeLists: Also detect cppzmq We don't _just_ use the ZeroMQ library, we also use the cppzmq bindings. Previously we weren't detecting for those at all. This adds a check for its configs, and adds its target to the openshot target linking (even though it's a header-only library). --- src/CMakeLists.txt | 15 +++++++++++---- tests/CMakeLists.txt | 7 +++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6980dbae..e5e8ee84 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,8 +6,8 @@ # # Copyright (c) 2008-2019 OpenShot Studios, LLC # . This file is part of -# OpenShot Library (libopenshot), an open-source project dedicated to -# delivering high quality video editing and animation solutions to the +# OpenShot Library (libopenshot), an open-source project dedicated to +# delivering high quality video editing and animation solutions to the # world. For more information visit . # # OpenShot Library (libopenshot) is free software: you can redistribute it @@ -161,7 +161,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++) @@ -181,10 +181,17 @@ endif(OPENMP_FOUND) ################### 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 5e18fcf3..42ca8ffc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -177,10 +177,17 @@ endif(OPENMP_FOUND) ################### 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)