Inside Bitcoin
Opening the selected file…
Inside Bitcoin
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) The Bitcoin Core developers2# Distributed under the MIT software license, see the accompanying3# file COPYING or http://www.opensource.org/licenses/mit-license.php.5# compat_config.cmake -- compatibility workarounds meant to be included after6# cmake find_package() calls are made, before configuring the ebuild8# Define capnp_PREFIX if not defined to avoid issue on macos9# https://github.com/bitcoin-core/libmultiprocess/issues/2611if (NOT DEFINED capnp_PREFIX AND DEFINED CAPNP_INCLUDE_DIRS)12get_filename_component(capnp_PREFIX "${CAPNP_INCLUDE_DIRS}" DIRECTORY)13endif()15if (NOT DEFINED CAPNPC_OUTPUT_DIR)16set(CAPNPC_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")17endif()19# CMake target definitions for backwards compatibility with Ubuntu bionic20# capnproto 0.6.1 package (https://packages.ubuntu.com/bionic/libcapnp-dev)21# https://github.com/bitcoin-core/libmultiprocess/issues/2723if (NOT DEFINED CAPNP_LIB_CAPNPC AND DEFINED CAPNP_LIB_CAPNP-RPC)24string(REPLACE "-rpc" "c" CAPNP_LIB_CAPNPC "${CAPNP_LIB_CAPNP-RPC}")25endif()27if (NOT DEFINED CapnProto_capnpc_IMPORTED_LOCATION AND DEFINED CapnProto_capnp-rpc_IMPORTED_LOCATION)28string(REPLACE "-rpc" "c" CapnProto_capnpc_IMPORTED_LOCATION "${CapnProto_capnp-rpc_IMPORTED_LOCATION}")29endif()31if (NOT TARGET CapnProto::capnp AND DEFINED CAPNP_LIB_CAPNP)32add_library(CapnProto::capnp SHARED IMPORTED)33set_target_properties(CapnProto::capnp PROPERTIES IMPORTED_LOCATION "${CAPNP_LIB_CAPNP}")34endif()36if (NOT TARGET CapnProto::capnpc AND DEFINED CAPNP_LIB_CAPNPC)37add_library(CapnProto::capnpc SHARED IMPORTED)38set_target_properties(CapnProto::capnpc PROPERTIES IMPORTED_LOCATION "${CAPNP_LIB_CAPNPC}")39endif()41if (NOT TARGET CapnProto::capnpc AND DEFINED CapnProto_capnpc_IMPORTED_LOCATION)42add_library(CapnProto::capnpc SHARED IMPORTED)43set_target_properties(CapnProto::capnpc PROPERTIES IMPORTED_LOCATION "${CapnProto_capnpc_IMPORTED_LOCATION}")44endif()46if (NOT TARGET CapnProto::capnp-rpc AND DEFINED CAPNP_LIB_CAPNP-RPC)47add_library(CapnProto::capnp-rpc SHARED IMPORTED)48set_target_properties(CapnProto::capnp-rpc PROPERTIES IMPORTED_LOCATION "${CAPNP_LIB_CAPNP-RPC}")49endif()51if (NOT TARGET CapnProto::kj AND DEFINED CAPNP_LIB_KJ)52add_library(CapnProto::kj SHARED IMPORTED)53set_target_properties(CapnProto::kj PROPERTIES IMPORTED_LOCATION "${CAPNP_LIB_KJ}")54endif()56if (NOT TARGET CapnProto::kj-async AND DEFINED CAPNP_LIB_KJ-ASYNC)57add_library(CapnProto::kj-async SHARED IMPORTED)58set_target_properties(CapnProto::kj-async PROPERTIES IMPORTED_LOCATION "${CAPNP_LIB_KJ-ASYNC}")59endif()
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.