cmake: Build bitcoin-qt executable
This commit is contained in:
4 files changed
+387
-1
No files matched your search
+15
-1
@@ -67,6 +67,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/module)
|
||||
include(CMakeDependentOption)
|
||||
# When adding a new option, end the <help_text> with a full stop for consistency.
|
||||
option(BUILD_DAEMON "Build bitcoind executable." ON)
|
||||
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
|
||||
option(BUILD_CLI "Build bitcoin-cli executable." ON)
|
||||
|
||||
option(BUILD_TESTS "Build test_bitcoin executable." ON)
|
||||
@@ -143,6 +144,17 @@ endif()
|
||||
|
||||
cmake_dependent_option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON "NOT WIN32" OFF)
|
||||
|
||||
if(BUILD_GUI)
|
||||
set(qt_components Core Gui Widgets LinguistTools)
|
||||
if(ENABLE_WALLET)
|
||||
list(APPEND qt_components Network)
|
||||
endif()
|
||||
find_package(Qt5 5.11.3 MODULE REQUIRED
|
||||
COMPONENTS ${qt_components}
|
||||
)
|
||||
unset(qt_components)
|
||||
endif()
|
||||
|
||||
option(BUILD_BENCH "Build bench_bitcoin executable." OFF)
|
||||
option(BUILD_FUZZ_BINARY "Build fuzz binary." OFF)
|
||||
cmake_dependent_option(BUILD_FOR_FUZZING "Build for fuzzing. Enabling this will disable all other targets and override BUILD_FUZZ_BINARY." OFF "NOT MSVC" OFF)
|
||||
@@ -178,6 +190,7 @@ if(BUILD_FOR_FUZZING)
|
||||
set(BUILD_TX OFF)
|
||||
set(BUILD_UTIL OFF)
|
||||
set(BUILD_WALLET_TOOL OFF)
|
||||
set(BUILD_GUI OFF)
|
||||
set(ENABLE_EXTERNAL_SIGNER OFF)
|
||||
set(WITH_NATPMP OFF)
|
||||
set(WITH_MINIUPNPC OFF)
|
||||
@@ -337,7 +350,7 @@ endif()
|
||||
include(AddBoostIfNeeded)
|
||||
add_boost_if_needed()
|
||||
|
||||
if(BUILD_DAEMON OR BUILD_CLI OR BUILD_TESTS OR BUILD_BENCH OR BUILD_FUZZ_BINARY)
|
||||
if(BUILD_DAEMON OR BUILD_GUI OR BUILD_CLI OR BUILD_TESTS OR BUILD_BENCH OR BUILD_FUZZ_BINARY)
|
||||
find_package(Libevent 2.1.8 MODULE REQUIRED)
|
||||
endif()
|
||||
|
||||
@@ -460,6 +473,7 @@ message("Configure summary")
|
||||
message("=================")
|
||||
message("Executables:")
|
||||
message(" bitcoind ............................ ${BUILD_DAEMON}")
|
||||
message(" bitcoin-qt (GUI) .................... ${BUILD_GUI}")
|
||||
message(" bitcoin-cli ......................... ${BUILD_CLI}")
|
||||
message(" bitcoin-tx .......................... ${BUILD_TX}")
|
||||
message(" bitcoin-util ........................ ${BUILD_UTIL}")
|
||||
|
||||
Reference in new issue
Block a user