This should work (I think), but it fails with "CMake libzmq package not found".
My guess is that line 11 to 25 of cppzmq's CMakeLists.txt, which uses "ZeroMQ_FOUND" is causing the issue.
Could you patch your CMakeLists.txt so that cppzmq can go along with FetchContent?
In my CMakeLists.txt, I Fetch libzmq and cppzmq in the following order:
FetchContent_Declare( zeromq GIT_REPOSITORY https://github.com/zeromq/libzmq.git GIT_TAG v4.3.2 ) FetchContent_Declare( cppzmq GIT_REPOSITORY https://github.com/zeromq/cppzmq.git GIT_TAG v4.6.0 ) FetchContent_MakeAvailable(zeromq cppzmq)
This should work (I think), but it fails with "CMake libzmq package not found". My guess is that line 11 to 25 of cppzmq's CMakeLists.txt, which uses "ZeroMQ_FOUND" is causing the issue.
Could you patch your CMakeLists.txt so that cppzmq can go along with FetchContent?
Thank you for your help