0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

Fix pkg_config_defines in CMakeFile

PR #4545 sets `pkg_config_defines` too late, i.e. after the pkg-config
file is already generated. It must be set before `configure_file`.
This commit is contained in:
Nicolas Benes 2023-05-15 19:43:22 +02:00 committed by Luca Boccassi
parent cc12997a17
commit 4d1dccaebd

View File

@ -163,6 +163,7 @@ if(ENABLE_DRAFTS)
message(STATUS "Building draft classes and methods")
option(ENABLE_WS "Enable WebSocket transport" ON)
option(ENABLE_RADIX_TREE "Use radix tree implementation to manage subscriptions" ON)
set(pkg_config_defines "-DZMQ_BUILD_DRAFT_API=1")
else()
message(STATUS "Not building draft classes and methods")
option(ENABLE_WS "Enable WebSocket transport" OFF)
@ -1464,7 +1465,6 @@ foreach(target ${build_targets})
if(ENABLE_DRAFTS)
target_compile_definitions(${target} PUBLIC ZMQ_BUILD_DRAFT_API)
set(pkg_config_defines "-DZMQ_BUILD_DRAFT_API=1")
endif()
endforeach()