3 include_directories( ${X11_dpms_INCLUDE_PATH} )
6 set( kded_powerdevil_SRCS
8 AbstractSystemPoller.cpp
13 SuspensionLockHandler.cpp
14 PowerManagementConnector.cpp
17 kde4_add_kcfg_files(kded_powerdevil_SRCS ../PowerDevilSettings.kcfgc)
19 set(screensaver_xml "${KDEBASE_WORKSPACE_SOURCE_DIR}/krunner/dbus/org.freedesktop.ScreenSaver.xml")
20 set(kscreensaver_xml ${KDEBASE_WORKSPACE_SOURCE_DIR}/krunner/dbus/org.kde.screensaver.xml)
21 set(ksmserver_xml ${KDEBASE_WORKSPACE_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml)
23 qt4_add_dbus_interface(kded_powerdevil_SRCS ${screensaver_xml} screensaver_interface )
24 qt4_add_dbus_interface(kded_powerdevil_SRCS ${kscreensaver_xml} kscreensaver_interface )
25 qt4_add_dbus_interface(kded_powerdevil_SRCS ${ksmserver_xml} ksmserver_interface )
26 qt4_add_dbus_adaptor( kded_powerdevil_SRCS org.kde.PowerDevil.xml PowerDevilDaemon.h PowerDevilDaemon )
28 qt4_add_dbus_adaptor( kded_powerdevil_SRCS ${KDE4_DBUS_INTERFACES_DIR}/org.freedesktop.PowerManagement.xml PowerManagementConnector.h PowerManagementConnector )
29 qt4_add_dbus_adaptor( kded_powerdevil_SRCS ${KDE4_DBUS_INTERFACES_DIR}/org.freedesktop.PowerManagement.Inhibit.xml PowerManagementConnector.h PowerManagementConnector powermanagementinhibitadaptor PowerManagementInhibitAdaptor )
31 kde4_add_plugin( kded_powerdevil
32 ${kded_powerdevil_SRCS}
35 target_link_libraries(kded_powerdevil
43 target_link_libraries(kded_powerdevil ${X11_Xss_LIB})
47 target_link_libraries(kded_powerdevil ${X11_Xext_LIB})
51 target_link_libraries(kded_powerdevil ${X11_XTest_LIB})
52 endif(X11_XTest_FOUND)
55 target_link_libraries(kded_powerdevil ${X11_LIBRARIES})
58 install( TARGETS kded_powerdevil DESTINATION ${PLUGIN_INSTALL_DIR} )
60 install( FILES powerdevil.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded )
61 install( FILES org.kde.PowerDevil.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )