mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05: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)
|
set(USE_QRCODE TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF)
|
||||||
if(BUILD_GUI)
|
if(BUILD_GUI)
|
||||||
set(qt_components Core Gui Widgets LinguistTools)
|
set(qt_components Core Gui Widgets LinguistTools)
|
||||||
if(ENABLE_WALLET)
|
if(ENABLE_WALLET)
|
||||||
list(APPEND qt_components Network)
|
list(APPEND qt_components Network)
|
||||||
endif()
|
endif()
|
||||||
|
if(WITH_DBUS)
|
||||||
|
list(APPEND qt_components DBus)
|
||||||
|
set(USE_DBUS TRUE)
|
||||||
|
endif()
|
||||||
find_package(Qt5 5.11.3 MODULE REQUIRED
|
find_package(Qt5 5.11.3 MODULE REQUIRED
|
||||||
COMPONENTS ${qt_components}
|
COMPONENTS ${qt_components}
|
||||||
)
|
)
|
||||||
|
@ -498,6 +503,7 @@ message(" - using UPnP ....................... ${WITH_MINIUPNPC}")
|
||||||
message(" ZeroMQ .............................. ${WITH_ZMQ}")
|
message(" ZeroMQ .............................. ${WITH_ZMQ}")
|
||||||
message(" USDT tracing ........................ ${WITH_USDT}")
|
message(" USDT tracing ........................ ${WITH_USDT}")
|
||||||
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
||||||
|
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
|
||||||
message("Tests:")
|
message("Tests:")
|
||||||
message(" test_bitcoin ........................ ${BUILD_TESTS}")
|
message(" test_bitcoin ........................ ${BUILD_TESTS}")
|
||||||
message(" bench_bitcoin ....................... ${BUILD_BENCH}")
|
message(" bench_bitcoin ....................... ${BUILD_BENCH}")
|
||||||
|
|
|
@ -141,6 +141,9 @@
|
||||||
/* Define if BDB support should be compiled in */
|
/* Define if BDB support should be compiled in */
|
||||||
#cmakedefine USE_BDB 1
|
#cmakedefine USE_BDB 1
|
||||||
|
|
||||||
|
/* Define if dbus support should be compiled in */
|
||||||
|
#cmakedefine USE_DBUS 1
|
||||||
|
|
||||||
/* Define if QR support should be compiled in */
|
/* Define if QR support should be compiled in */
|
||||||
#cmakedefine USE_QRCODE 1
|
#cmakedefine USE_QRCODE 1
|
||||||
|
|
||||||
|
|
|
@ -214,6 +214,10 @@ if(ENABLE_WALLET)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_DBUS)
|
||||||
|
target_link_libraries(bitcoinqt PRIVATE Qt5::DBus)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(qt_lib_type STREQUAL "STATIC_LIBRARY")
|
if(qt_lib_type STREQUAL "STATIC_LIBRARY")
|
||||||
# We want to define static plugins to link ourselves, thus preventing
|
# We want to define static plugins to link ourselves, thus preventing
|
||||||
# automatic linking against a "sane" set of default static plugins.
|
# automatic linking against a "sane" set of default static plugins.
|
||||||
|
|
Loading…
Add table
Reference in a new issue