From 87065068ca4d3eeee132a0a3f7732c4ca3cf2142 Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Fri, 3 Mar 2023 11:11:41 +0100 Subject: [PATCH] CMake: properly set ZMQ_HAVE_OPENPGM and ZMQ_HAVE_VMCI Signed-off-by: Stephan Lachnit --- CMakeLists.txt | 6 ++++-- builds/cmake/platform.hpp.in | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 072a6507..4ebeea7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1186,7 +1186,8 @@ set(readme-docs AUTHORS COPYING COPYING.LESSER NEWS) # optional modules if(WITH_OPENPGM) - add_definitions(-DZMQ_HAVE_OPENPGM) + message(STATUS "Building with OpenPGM") + set(ZMQ_HAVE_OPENPGM 1) include_directories(${OPENPGM_INCLUDE_DIRS}) link_directories(${OPENPGM_LIBRARY_DIRS}) set(OPTIONAL_LIBRARIES ${OPENPGM_LIBRARIES}) @@ -1203,7 +1204,8 @@ if(WITH_NORM) endif() if(WITH_VMCI) - add_definitions(-DZMQ_HAVE_VMCI) +message(STATUS "Building with VMCI") + set(ZMQ_HAVE_VMCI 1) include_directories(${VMCI_INCLUDE_DIRS}) list(APPEND cxx-sources vmci_address.cpp vmci_connecter.cpp vmci_listener.cpp vmci.cpp) endif() diff --git a/builds/cmake/platform.hpp.in b/builds/cmake/platform.hpp.in index f2edff84..50475896 100644 --- a/builds/cmake/platform.hpp.in +++ b/builds/cmake/platform.hpp.in @@ -69,6 +69,8 @@ #cmakedefine ZMQ_HAVE_OPENPGM #cmakedefine ZMQ_HAVE_NORM +#cmakedefine ZMQ_HAVE_VMCI + #cmakedefine ZMQ_MAKE_VALGRIND_HAPPY #cmakedefine ZMQ_HAVE_CURVE