cmake: Support building with libmultiprocess subtree
When ENABLE_IPC option is on, build with libmultiprocess subtree and `add_subdirectory(src/ipc/libmultiprocess)` instead of external package and `find_package(Libmultiprocess)` by default. Behavior can be toggled with `WITH_EXTERNAL_LIBMULTIPROCESS` option. Using a subtree should be more convenient for most bitcoin developers, but using an external package is more convenient for developing in the libmultiprocess repository. The `WITH_EXTERNAL_LIBMULTIPROCESS` option is also used to avoid needing to changing the depends build here. But in later commits, the depends build is switched to use the add_subdirectory build as well. Co-authored-by: Cory Fields <cory-nospam-@coryfields.com> Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
This commit is contained in:
1 parent
69f0d4adb7
commit
d597ab1dee
4 files changed
+46
-1
No files matched your search
+12
-1
@@ -154,7 +154,8 @@ endif()
|
||||
cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF)
|
||||
|
||||
option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF)
|
||||
if(ENABLE_IPC)
|
||||
cmake_dependent_option(WITH_EXTERNAL_LIBMULTIPROCESS "Build with external libmultiprocess library instead of with local git subtree when ENABLE_IPC is enabled. This is not normally recommended, but can be useful when cross-compiling or making changes to the upstream project." OFF "ENABLE_IPC" OFF)
|
||||
if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS)
|
||||
find_package(Libmultiprocess REQUIRED COMPONENTS Lib)
|
||||
find_package(LibmultiprocessNative REQUIRED COMPONENTS Bin
|
||||
NAMES Libmultiprocess
|
||||
@@ -674,6 +675,16 @@ if(ENABLE_WALLET)
|
||||
endif()
|
||||
message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}")
|
||||
message(" ZeroMQ .............................. ${WITH_ZMQ}")
|
||||
if(ENABLE_IPC)
|
||||
if (WITH_EXTERNAL_LIBMULTIPROCESS)
|
||||
set(ipc_status "ON (with external libmultiprocess)")
|
||||
else()
|
||||
set(ipc_status ON)
|
||||
endif()
|
||||
else()
|
||||
set(ipc_status OFF)
|
||||
endif()
|
||||
message(" IPC ................................. ${ipc_status}")
|
||||
message(" USDT tracing ........................ ${WITH_USDT}")
|
||||
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
||||
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
|
||||
|
||||
Reference in new issue
Block a user