diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-04-29 21:23:42 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-08-16 19:27:40 +0100 |
commit | d2fda82b4954f4af7e7d340cf42b9cb34d96cde1 (patch) | |
tree | 6666ee655c516be5e013ad4b06ffa05f9a136ed0 /src/zmq/CMakeLists.txt | |
parent | ae7b39a0e106d798b6e9cc03ee783d9081e41480 (diff) |
cmake: Add `libzmq` optional package support
Diffstat (limited to 'src/zmq/CMakeLists.txt')
-rw-r--r-- | src/zmq/CMakeLists.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/zmq/CMakeLists.txt b/src/zmq/CMakeLists.txt new file mode 100644 index 0000000000..8ecb236b46 --- /dev/null +++ b/src/zmq/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +add_library(bitcoin_zmq STATIC EXCLUDE_FROM_ALL + zmqabstractnotifier.cpp + zmqnotificationinterface.cpp + zmqpublishnotifier.cpp + zmqrpc.cpp + zmqutil.cpp +) +target_compile_definitions(bitcoin_zmq + INTERFACE + ENABLE_ZMQ=1 + PRIVATE + $<$<AND:$<PLATFORM_ID:Windows>,$<CXX_COMPILER_ID:GNU>>:ZMQ_STATIC> +) +target_link_libraries(bitcoin_zmq + PRIVATE + core_interface + univalue + $<TARGET_NAME_IF_EXISTS:libzmq> + $<TARGET_NAME_IF_EXISTS:PkgConfig::libzmq> +) |