diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,13 +22,17 @@ option(ENABLE_GLIBC_BACK_COMPAT "Enable Glibc compatibility features" OFF) option(ENABLE_QRCODE "Enable QR code display" ON) option(ENABLE_UPNP "Enable UPnP support" ON) -option(ENABLE_NOTIFICATIONS "Enable desktop notifications" ON) option(ENABLE_WERROR "Promote some compiler warnings to errors" OFF) option(START_WITH_UPNP "Make UPnP the default to map ports" OFF) option(ENABLE_CLANG_TIDY "Enable clang-tidy checks for Bitcoin ABC" OFF) option(ENABLE_PROFILING "Select the profiling tool to use" OFF) option(USE_LD_GOLD "Try to use gold as a linker if available" ON) +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(DEFAULT_ENABLE_DBUS_NOTIFICATIONS ON) +endif() +option(ENABLE_DBUS_NOTIFICATIONS "Enable DBus desktop notifications. Linux only." ${DEFAULT_ENABLE_DBUS_NOTIFICATIONS}) + # If ccache is available, then use it. find_program(CCACHE ccache) if(CCACHE) diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -222,7 +222,7 @@ set(USE_UPNP ${START_WITH_UPNP} CACHE INTERNAL "UPnP is enabled") endif() -if(ENABLE_NOTIFICATIONS) +if(ENABLE_DBUS_NOTIFICATIONS) set(USE_DBUS 1) endif() diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -9,7 +9,7 @@ find_brew_prefix(QT5_PREFIX qt5) set(QT_REQUIRED_COMPONENTS Core Widgets Network Test) -if(ENABLE_NOTIFICATIONS) +if(ENABLE_DBUS_NOTIFICATIONS) list(APPEND QT_REQUIRED_COMPONENTS DBus) endif() @@ -228,7 +228,7 @@ Qt5::Widgets Qt5::Network ) -if(ENABLE_NOTIFICATIONS) +if(ENABLE_DBUS_NOTIFICATIONS) target_link_libraries(bitcoin-qt-base Qt5::DBus) endif()