Skip to content

Commit

Permalink
cmake: Add WITH_DBUS option
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed May 3, 2024
1 parent 927a78d commit ec486a3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ if(WITH_QRENCODE)
)
endif()

cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF)

option(MULTIPROCESS "Build multiprocess bitcoin-node, bitcoin-wallet, and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF)
if(MULTIPROCESS)
find_package(Libmultiprocess CONFIG REQUIRED)
Expand Down Expand Up @@ -589,6 +591,7 @@ message(" 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(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
Expand Down
8 changes: 8 additions & 0 deletions src/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set(qt_components Core Gui Widgets LinguistTools)
if(ENABLE_WALLET)
list(APPEND qt_components Network)
endif()
if(WITH_DBUS)
list(APPEND qt_components DBus)
endif()
if(BUILD_GUI_TESTS)
list(APPEND qt_components Test)
endif()
Expand Down Expand Up @@ -174,6 +177,11 @@ if(ENABLE_WALLET)
)
endif()

if(WITH_DBUS)
target_compile_definitions(bitcoinqt PRIVATE USE_DBUS)
target_link_libraries(bitcoinqt PRIVATE Qt5::DBus)
endif()

if(QT_IS_STATIC)
# We want to define static plugins to link ourselves, thus preventing
# automatic linking against a "sane" set of default static plugins.
Expand Down
4 changes: 0 additions & 4 deletions src/qt/notificator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <qt/notificator.h>

#include <QApplication>
Expand Down
4 changes: 0 additions & 4 deletions src/qt/notificator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
#ifndef BITCOIN_QT_NOTIFICATOR_H
#define BITCOIN_QT_NOTIFICATOR_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <QIcon>
#include <QObject>

Expand Down

0 comments on commit ec486a3

Please sign in to comment.