diff --git a/CMakeLists.txt b/CMakeLists.txt index 361f0ab2..46db37a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()