0001-fix-install-without-static-libzmq.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From bffb0eda34195339f2af49f2879d9d0b9dee5c28 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Thu, 20 Sep 2018 19:37:26 +0200
  4. Subject: [PATCH] fix install without static libzmq
  5. If libzmq is only available as a shared library and not a static one
  6. then cmake fails with:
  7. -- CMake libzmq package not found, trying again with pkg-config (normal install of zeromq)
  8. -- Found PkgConfig: /home/fabrice/buildroot/output/host/bin/pkg-config (found version "0.28")
  9. CMake Error at CMakeLists.txt:20 (message):
  10. ZeroMQ was not found, neither as a CMake package nor via pkg-config
  11. This is due to the fact that ZeroMQ_FOUND is not set to ON even if
  12. ZEROMQ_LIBRARY is TRUE:
  13. if(ZeroMQ_LIBRARY AND ZeroMQ_STATIC_LIBRARY)
  14. set(ZeroMQ_FOUND ON)
  15. endif()
  16. So change AND by OR as suggested in
  17. https://github.com/zeromq/cppzmq/issues/266
  18. Fix #266
  19. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  20. [Upstream status: https://github.com/zeromq/cppzmq/pull/267]
  21. ---
  22. libzmq-pkg-config/FindZeroMQ.cmake | 2 +-
  23. 1 file changed, 1 insertion(+), 1 deletion(-)
  24. diff --git a/libzmq-pkg-config/FindZeroMQ.cmake b/libzmq-pkg-config/FindZeroMQ.cmake
  25. index 89d8236..1b84c95 100644
  26. --- a/libzmq-pkg-config/FindZeroMQ.cmake
  27. +++ b/libzmq-pkg-config/FindZeroMQ.cmake
  28. @@ -8,7 +8,7 @@ find_library(ZeroMQ_LIBRARY NAMES libzmq.so libzmq.dylib libzmq.dll
  29. find_library(ZeroMQ_STATIC_LIBRARY NAMES libzmq-static.a libzmq.a libzmq.dll.a
  30. PATHS ${PC_LIBZMQ_LIBDIR} ${PC_LIBZMQ_LIBRARY_DIRS})
  31. -if(ZeroMQ_LIBRARY AND ZeroMQ_STATIC_LIBRARY)
  32. +if(ZeroMQ_LIBRARY OR ZeroMQ_STATIC_LIBRARY)
  33. set(ZeroMQ_FOUND ON)
  34. endif()
  35. --
  36. 2.17.1