Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with CMake #211

Open
sbendt opened this issue Sep 6, 2023 · 0 comments
Open

Building with CMake #211

sbendt opened this issue Sep 6, 2023 · 0 comments

Comments

@sbendt
Copy link

sbendt commented Sep 6, 2023

Hi,

Probably not an issue, more of a question.
I am trying to setup a C++ application that will be using ZeroMQ with the azmq, but I am a bit stuck on setting up the CMake configuration for my application.

I would like to have everything in the CMake configuration, and not rely on anything being installed before the build.

From my CMakeLists.txt:

message(STATUS "ZeroMQ...")
include(FetchContent)
FetchContent_Declare(
ZeroMQ
GIT_REPOSITORY https://github.com/zeromq/zeromq4-x
GIT_TAG 267699b1ce7791bb360a794b9230b21676129612 # v4.0.10
)

set(AZMQ_NO_TESTS, ON)
set(AZMQ_BUILD_TESTS, OFF)
message(STATUS "azmq...")
FetchContent_Declare(
azmq
GIT_REPOSITORY https://github.com/zeromq/azmq
GIT_TAG 7da2fd0 # v1.0.3
)

FetchContent_MakeAvailable(ZeroMQ azmq)

CMake fails with:
[cmake] CMake Error at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[cmake] Could NOT find ZeroMQ (missing: ZeroMQ_INCLUDE_DIRS ZeroMQ_LIBRARIES)
[cmake] (Required is at least version "4.0")
[cmake] Call Stack (most recent call first):
[cmake] C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
[cmake] build/_deps/azmq-src/config/FindZeroMQ.cmake:77 (find_package_handle_standard_args)
[cmake] build/_deps/azmq-src/CMakeLists.txt:43 (find_package)

Can/should I assign those DIRS manually, or is this something ZeroMQ CMakeLists.txt should assign?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant