mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
cmake: Add WITH_DBUS
option
This commit is contained in:
parent
5bb5a4bc75
commit
10fcc668a3
3 changed files with 13 additions and 0 deletions
|
@ -151,11 +151,16 @@ if(WITH_QRENCODE)
|
|||
set(USE_QRCODE TRUE)
|
||||
endif()
|
||||
|
||||
cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF)
|
||||
if(BUILD_GUI)
|
||||
set(qt_components Core Gui Widgets LinguistTools)
|
||||
if(ENABLE_WALLET)
|
||||
list(APPEND qt_components Network)
|
||||
endif()
|
||||
if(WITH_DBUS)
|
||||
list(APPEND qt_components DBus)
|
||||
set(USE_DBUS TRUE)
|
||||
endif()
|
||||
find_package(Qt5 5.11.3 MODULE REQUIRED
|
||||
COMPONENTS ${qt_components}
|
||||
)
|
||||
|
@ -498,6 +503,7 @@ message(" - using UPnP ....................... ${WITH_MINIUPNPC}")
|
|||
message(" ZeroMQ .............................. ${WITH_ZMQ}")
|
||||
message(" USDT tracing ........................ ${WITH_USDT}")
|
||||
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
||||
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
|
||||
message("Tests:")
|
||||
message(" test_bitcoin ........................ ${BUILD_TESTS}")
|
||||
message(" bench_bitcoin ....................... ${BUILD_BENCH}")
|
||||
|
|
|
@ -141,6 +141,9 @@
|
|||
/* Define if BDB support should be compiled in */
|
||||
#cmakedefine USE_BDB 1
|
||||
|
||||
/* Define if dbus support should be compiled in */
|
||||
#cmakedefine USE_DBUS 1
|
||||
|
||||
/* Define if QR support should be compiled in */
|
||||
#cmakedefine USE_QRCODE 1
|
||||
|
||||
|
|
|
@ -214,6 +214,10 @@ if(ENABLE_WALLET)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(WITH_DBUS)
|
||||
target_link_libraries(bitcoinqt PRIVATE Qt5::DBus)
|
||||
endif()
|
||||
|
||||
if(qt_lib_type STREQUAL "STATIC_LIBRARY")
|
||||
# We want to define static plugins to link ourselves, thus preventing
|
||||
# automatic linking against a "sane" set of default static plugins.
|
||||
|
|
Loading…
Add table
Reference in a new issue