Commit Graph

4 Commits

Author SHA1 Message Date
Fabrice Fontaine
bffb0eda34 fix install without static libzmq
If libzmq is only available as a shared library and not a static one
then cmake fails with:

-- CMake libzmq package not found, trying again with pkg-config (normal install of zeromq)
-- Found PkgConfig: /home/fabrice/buildroot/output/host/bin/pkg-config (found version "0.28")
CMake Error at CMakeLists.txt:20 (message):
  ZeroMQ was not found, neither as a CMake package nor via pkg-config

This is due to the fact that ZeroMQ_FOUND is not set to ON even if
ZEROMQ_LIBRARY is TRUE:

if(ZeroMQ_LIBRARY AND ZeroMQ_STATIC_LIBRARY)
    set(ZeroMQ_FOUND ON)
endif()

So change AND by OR as suggested in
https://github.com/zeromq/cppzmq/issues/266

Fix #266

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-09-20 23:28:24 +02:00
Pawel Kurdybacha
115bfffc50 Problem: Travis requires sudo
sudo was required for for pkg-config libzmq build as cppzmq could not
find not installed pkg-config libzmq.

Solution: cppzmq to use cmake prefix paths for pkg config paths as well.
2018-05-23 19:18:28 +00:00
Simon Giesecke
80dc604ed0 Problem: No tests for libzmq 4.2.0
Solution: add travis job with libzmq 4.2.0
2018-04-03 18:41:44 +02:00
Min RK
f4c0c5e6a3 call pkg-config fallback FindZeroMQ.cmake
and add it to CMAKE_MODULE_PATH on failed load

this allows downstream packages that have loaded cppzmq to call find_package(ZeroMQ) and succeed without shipping their own copy of the fallback.

Additionally, a check for if the libzmq target is defined avoids duplicate definitions when called multiple times
2018-01-13 14:13:38 -08:00