v31.1-roots.1 · Commit 1: [PATCH 01/17] build(roots): establish v31 portability foundation
CMakeLists.txt
Before: CMakeLists.txt · After: CMakeLists.txt
File metadata
index 6109639f00390e2bbd050d8cfed69320bf1ec159..4bfd4a3c1ab62c7f69fa7a22d862ec6a20cd85ac 100644
Download original patch · Release notes
Diff rows 1–69 of 69. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
CMakeLists.txt
CHANGED
|
@@ -112,6 +112,20 @@ option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable."
|
|
| 112 |
option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE})
|
| 113 |
cmake_dependent_option(BUILD_KERNEL_TEST "Build tests for the experimental bitcoinkernel library." ON "BUILD_KERNEL_LIB" OFF)
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
option(ENABLE_WALLET "Enable wallet." ON)
|
| 116 |
if(ENABLE_WALLET)
|
| 117 |
if(VCPKG_TARGET_TRIPLET)
|
|
@@ -136,6 +150,11 @@ if(WITH_ZMQ)
|
|
| 136 |
find_package(ZeroMQ 4.0.0 MODULE REQUIRED)
|
| 137 |
endif()
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
option(WITH_EMBEDDED_ASMAP "Embed default ASMap data." ON)
|
| 140 |
|
| 141 |
option(WITH_USDT "Enable tracepoints for Userspace, Statically Defined Tracing." OFF)
|
|
@@ -163,6 +182,11 @@ if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS)
|
|
| 163 |
endif()
|
| 164 |
|
| 165 |
cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
if(BUILD_GUI)
|
| 167 |
set(qt_components Core Gui Widgets LinguistTools)
|
| 168 |
if(ENABLE_WALLET)
|
|
@@ -175,9 +199,15 @@ if(BUILD_GUI)
|
|
| 175 |
if(BUILD_GUI_TESTS)
|
| 176 |
list(APPEND qt_components Test)
|
| 177 |
endif()
|
| 178 |
-
find_package(Qt 6.2 MODULE REQUIRED
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
COMPONENTS ${qt_components}
|
| 180 |
)
|
|
|
|
| 181 |
unset(qt_components)
|
| 182 |
endif()
|
| 183 |
|
|
@@ -670,6 +700,11 @@ message(" Embedded ASMap ...................... ${WITH_EMBEDDED_ASMAP}")
|
|
| 670 |
message(" USDT tracing ........................ ${WITH_USDT}")
|
| 671 |
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
| 672 |
message(" DBus (GUI) .......................... ${WITH_DBUS}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 673 |
message("Tests:")
|
| 674 |
message(" test_bitcoin ........................ ${BUILD_TESTS}")
|
| 675 |
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
|
|
|
|
| 112 |
option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE})
|
| 113 |
cmake_dependent_option(BUILD_KERNEL_TEST "Build tests for the experimental bitcoinkernel library." ON "BUILD_KERNEL_LIB" OFF)
|
| 114 |
|
| 115 |
+
option(WITH_SYSTEM_LEVELDB "Build with system LevelDB instead of the embedded fork." OFF)
|
| 116 |
+
mark_as_advanced(WITH_SYSTEM_LEVELDB)
|
| 117 |
+
set(EMBEDDED_LEVELDB TRUE)
|
| 118 |
+
if(WITH_SYSTEM_LEVELDB)
|
| 119 |
+
set(EMBEDDED_LEVELDB FALSE)
|
| 120 |
+
find_package(LevelDB MODULE REQUIRED)
|
| 121 |
+
endif()
|
| 122 |
+
|
| 123 |
+
option(WITH_SYSTEM_LIBSECP256K1 "Build with system libsecp256k1 instead of the embedded copy." OFF)
|
| 124 |
+
mark_as_advanced(WITH_SYSTEM_LIBSECP256K1)
|
| 125 |
+
if(WITH_SYSTEM_LIBSECP256K1)
|
| 126 |
+
include(CheckSystemSecp256k1)
|
| 127 |
+
endif()
|
| 128 |
+
|
| 129 |
option(ENABLE_WALLET "Enable wallet." ON)
|
| 130 |
if(ENABLE_WALLET)
|
| 131 |
if(VCPKG_TARGET_TRIPLET)
|
|
|
|
| 150 |
find_package(ZeroMQ 4.0.0 MODULE REQUIRED)
|
| 151 |
endif()
|
| 152 |
|
| 153 |
+
option(WITH_MINIUPNPC "Discover MiniUPnPc for deferred Roots UPnP integration." OFF)
|
| 154 |
+
if(WITH_MINIUPNPC)
|
| 155 |
+
find_package(MiniUPnPc MODULE REQUIRED)
|
| 156 |
+
endif()
|
| 157 |
+
|
| 158 |
option(WITH_EMBEDDED_ASMAP "Embed default ASMap data." ON)
|
| 159 |
|
| 160 |
option(WITH_USDT "Enable tracepoints for Userspace, Statically Defined Tracing." OFF)
|
|
|
|
| 182 |
endif()
|
| 183 |
|
| 184 |
cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF)
|
| 185 |
+
set(WITH_QT_VERSION "6" CACHE STRING "Qt major version to use for GUI builds (5 or 6).")
|
| 186 |
+
set_property(CACHE WITH_QT_VERSION PROPERTY STRINGS 5 6)
|
| 187 |
+
if(NOT WITH_QT_VERSION MATCHES "^[56]$")
|
| 188 |
+
message(FATAL_ERROR "WITH_QT_VERSION must be 5 or 6.")
|
| 189 |
+
endif()
|
| 190 |
if(BUILD_GUI)
|
| 191 |
set(qt_components Core Gui Widgets LinguistTools)
|
| 192 |
if(ENABLE_WALLET)
|
|
|
|
| 199 |
if(BUILD_GUI_TESTS)
|
| 200 |
list(APPEND qt_components Test)
|
| 201 |
endif()
|
| 202 |
+
if(WITH_QT_VERSION STREQUAL "5")
|
| 203 |
+
set(qt_min_version 5.11.3)
|
| 204 |
+
else()
|
| 205 |
+
set(qt_min_version 6.2)
|
| 206 |
+
endif()
|
| 207 |
+
find_package(Qt ${qt_min_version} MODULE REQUIRED
|
| 208 |
COMPONENTS ${qt_components}
|
| 209 |
)
|
| 210 |
+
unset(qt_min_version)
|
| 211 |
unset(qt_components)
|
| 212 |
endif()
|
| 213 |
|
|
|
|
| 700 |
message(" USDT tracing ........................ ${WITH_USDT}")
|
| 701 |
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
| 702 |
message(" DBus (GUI) .......................... ${WITH_DBUS}")
|
| 703 |
+
message(" Qt major version (GUI) .............. ${WITH_QT_VERSION}")
|
| 704 |
+
message(" System LevelDB ...................... ${WITH_SYSTEM_LEVELDB}")
|
| 705 |
+
message(" System libsecp256k1 .................. ${WITH_SYSTEM_LIBSECP256K1}")
|
| 706 |
+
message(" MiniUPnPc dependency ................ ${WITH_MINIUPNPC} (UPnP runtime deferred)")
|
| 707 |
+
message(" Deferred Roots behavior ............. see doc/roots-features.md")
|
| 708 |
message("Tests:")
|
| 709 |
message(" test_bitcoin ........................ ${BUILD_TESTS}")
|
| 710 |
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
|