Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1# Copyright (c) 2024-present The Bitcoin Core developers2# Distributed under the MIT software license, see the accompanying3# file COPYING or https://opensource.org/license/mit/.5#[=======================================================================[6FindZeroMQ7----------9Finds the ZeroMQ headers and library.11This is a wrapper around find_package()/pkg_check_modules() commands that:12- facilitates searching in various build environments13- prints a standard log message15#]=======================================================================]17include(FindPackageHandleStandardArgs)18find_package(ZeroMQ ${ZeroMQ_FIND_VERSION} NO_MODULE QUIET)19if(ZeroMQ_FOUND)20find_package_handle_standard_args(ZeroMQ21REQUIRED_VARS ZeroMQ_DIR22VERSION_VAR ZeroMQ_VERSION23)24if(TARGET libzmq)25add_library(zeromq ALIAS libzmq)26elseif(TARGET libzmq-static)27add_library(zeromq ALIAS libzmq-static)28endif()29mark_as_advanced(ZeroMQ_DIR)30else()31find_package(PkgConfig REQUIRED)32pkg_check_modules(libzmq QUIET33IMPORTED_TARGET34libzmq>=${ZeroMQ_FIND_VERSION}35)36find_package_handle_standard_args(ZeroMQ37REQUIRED_VARS libzmq_LIBRARY_DIRS38VERSION_VAR libzmq_VERSION39)40add_library(zeromq ALIAS PkgConfig::libzmq)41endif()
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.