set(notificationhelper_SRCS
    notificationhelpermodule.cpp
    event.cpp
    configwatcher.cpp
    apportevent/apportevent.cpp
    hookevent/hookevent.cpp
    hookevent/hookgui.cpp
    hookevent/hook.cpp
    hookevent/locale.cpp
    installevent/installdbuswatcher.cpp
    installevent/installevent.cpp
    installevent/installgui.cpp
    l10nevent/l10nevent.cpp
    l10nevent/l10ninstallgui.cpp
    rebootevent/rebootevent.cpp
    driverevent/Device.cpp
    driverevent/driverevent.cpp
)
message(WARNING "hookevent is a pile of madness including locale....")

qt_add_dbus_adaptor(notificationhelper_SRCS org.kubuntu.NotificationHelper.xml
                     configwatcher.h ConfigWatcher)
qt_add_dbus_adaptor(notificationhelper_SRCS installevent/org.kubuntu.restrictedInstall.xml
                     installevent/installdbuswatcher.h InstallDBusWatcher)

set(drivermanagerobject_xml driverevent/org.kubuntu.DriverManager.xml)
set_source_files_properties(${drivermanagerobject_xml}
    PROPERTIES INCLUDE driverevent/drivermanagerdbustypes.h)
qt_add_dbus_interface(notificationhelper_SRCS ${drivermanagerobject_xml}
                       drivermanager_interface)

# KI18N Translation Domain for this library
add_definitions(-DTRANSLATION_DOMAIN=\"notificationhelper\")

add_library(kded_notificationhelper MODULE ${notificationhelper_SRCS})

target_link_libraries(kded_notificationhelper
    KF6::ConfigCore
    KF6::CoreAddons
    KF6::DBusAddons
    KF6::I18n
    KF6::KIOGui
    KF6::Notifications
    KF6::Service
    KF6::StatusNotifierItem
    KF6::WidgetsAddons
    KF6::WindowSystem
    PK::packagekitqt6
    Kubuntu::Main)

install(TARGETS kded_notificationhelper DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf6/kded)

install(FILES notificationhelper.notifyrc DESTINATION ${KDE_INSTALL_DATADIR}/knotifications6)

