-
Notifications
You must be signed in to change notification settings - Fork 795
Description
I'm not sure if this is logic to improve (meaning it should only fail if both shared and static libraries are not created) or an error message to be improved.
I've compile libZMQ 4.3.1 with only a static library. Then when I try to cmake cppzmq it fails with the following
cmake -D ZeroMQ_DIR="C:\Users\rocha\REPO2\build_rocha\depot\Stratovan\Library\3rdParty\libzmq\INSTALL\NEW\CMake" ..\cppzmq-4.3.0 -- Detected CPPZMQ Version - 4.3.0 CMake Error at CMakeLists.txt:24 (message): ZeroMQ version not supported!
This message looks like its a version mismatch between CPPZMQ @ 4.3.0 and libZMQ @ 4.3.1. However, when I looked at the logic I see the following:
if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static)) message(FATAL_ERROR "ZeroMQ version not supported!") endif()
The problem is that we found ZMQ package but we don't have libzmq (because I didn't make the shared library).
If CPPZMQ only requires one of the library, static or shared, then the logic should be changed from OR to AND.
If CPPZMQ requres both static and shared libraries, then I would recommend changing the error message to indicate the actual problem. The specified version of ZMQ is missing the <static,shared> library