Skip to content

Building with CMake #211

@sbendt

Description

@sbendt

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions