Skip to content

Commit 9b9e4a7

Browse files
committed
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).
1 parent c685571 commit 9b9e4a7

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#
77
# Copyright (c) 2008-2019 OpenShot Studios, LLC
88
# <http://www.openshotstudios.com/>. This file is part of
9-
# OpenShot Library (libopenshot), an open-source project dedicated to
10-
# delivering high quality video editing and animation solutions to the
9+
# OpenShot Library (libopenshot), an open-source project dedicated to
10+
# delivering high quality video editing and animation solutions to the
1111
# world. For more information visit <http://www.openshot.org/>.
1212
#
1313
# OpenShot Library (libopenshot) is free software: you can redistribute it
@@ -161,7 +161,7 @@ IF (ENABLE_BLACKMAGIC)
161161
FIND_PACKAGE(BlackMagic)
162162

163163
IF (BLACKMAGIC_FOUND)
164-
# Include headers (needed for compile)
164+
# Include Blackmagic headers (needed for compile)
165165
include_directories(${BLACKMAGIC_INCLUDE_DIR})
166166

167167
# define a global var (used in the C++)
@@ -181,10 +181,17 @@ endif(OPENMP_FOUND)
181181

182182
################### ZEROMQ #####################
183183
# Find ZeroMQ library (used for socket communication & logging)
184-
FIND_PACKAGE(ZMQ REQUIRED)
184+
185+
# Some platforms package the header-only cppzmq C++ bindings separately,
186+
# others (Ubuntu) bundle them in with libzmq itself
187+
find_package(cppzmq QUIET)
188+
find_package(ZMQ REQUIRED)
185189

186190
# Include ZeroMQ headers (needed for compile)
187191
include_directories(${ZMQ_INCLUDE_DIRS})
192+
if (cppzmq_FOUND)
193+
include_directories(${cppzmq_INCLUDE_DIRS})
194+
endif()
188195

189196
################### RESVG #####################
190197
# Find resvg library (used for rendering svg files)

tests/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,17 @@ endif(OPENMP_FOUND)
177177

178178
################### ZEROMQ #####################
179179
# Find ZeroMQ library (used for socket communication & logging)
180+
181+
# Some platforms package the header-only cppzmq C++ bindings separately,
182+
# others (Ubuntu) bundle them in with libzmq itself
183+
find_package(cppzmq QUIET)
180184
FIND_PACKAGE(ZMQ REQUIRED)
181185

182186
# Include ZeroMQ headers (needed for compile)
183187
include_directories(${ZMQ_INCLUDE_DIRS})
188+
if (cppzmq_FOUND)
189+
include_directories(${cppzmq_INCLUDE_DIRS})
190+
endif()
184191

185192
################### RESVG #####################
186193
# Find resvg library (used for rendering svg files)

0 commit comments

Comments
 (0)