Problem: CMake on Linux does not link libzmq with optional libs

Solution: add missing target_link_libraries
Fixes #2701
This commit is contained in:
Luca Boccassi 2017-08-19 12:26:36 +01:00
parent 90b6c102bb
commit 7453a02144

View File

@ -776,6 +776,7 @@ if (MSVC)
else ()
if (BUILD_SHARED)
add_library (libzmq SHARED ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig})
target_link_libraries (libzmq ${OPTIONAL_LIBRARIES})
# NOTE: the SOVERSION MUST be the same as the one generated by libtool!
set_target_properties (libzmq PROPERTIES
COMPILE_DEFINITIONS "DLL_EXPORT"