kdeconnect-kde/plugins/sendnotifications/CMakeLists.txt
Albert Vaca Cintora b8b30ba571 Use libdbus instead of GIO to listen for notifications
This fixes the `Error calling StartServiceByName for org.gtk.vfs.Daemon` message and subsequent crash if both the Receive Notifications plugin and Send Notifications plugin where enabled and we received a notification.

Most of the code comes from the SailfishConnect implementation here: https://github.com/R1tschY/harbour-sailfishconnect/blob/master/plugins/sf_sendnotifications/notificationslistener.cpp
2023-08-13 19:43:59 +00:00

37 lines
1,002 B
CMake

kdeconnect_add_plugin(kdeconnect_sendnotifications)
target_sources(kdeconnect_sendnotifications PRIVATE
sendnotificationsplugin.cpp
notificationslistener.cpp
notifyingapplication.cpp
)
target_link_libraries(kdeconnect_sendnotifications
kdeconnectcore
Qt::DBus
KF${QT_MAJOR_VERSION}::I18n
Qt::Gui
KF${QT_MAJOR_VERSION}::IconThemes
KF${QT_MAJOR_VERSION}::ConfigCore
${DBus_LIBRARIES}
)
target_include_directories(kdeconnect_sendnotifications
SYSTEM PRIVATE ${DBus_INCLUDE_DIRS}
)
# Config
kdeconnect_add_kcm(kdeconnect_sendnotifications_config)
ki18n_wrap_ui(kdeconnect_sendnotifications_config sendnotifications_config.ui)
target_sources(kdeconnect_sendnotifications_config PRIVATE
sendnotifications_config.cpp
notifyingapplication.cpp
notifyingapplicationmodel.cpp
)
target_link_libraries(kdeconnect_sendnotifications_config
kdeconnectcore
kdeconnectpluginkcm
KF${QT_MAJOR_VERSION}::I18n
KF${QT_MAJOR_VERSION}::KCMUtils
)