dtor first
[personal-kdebase.git] / workspace / powerdevil / daemon / CMakeLists.txt
blob4a96810e08d76e4f6a387b4670fd3f8a3a4fc0d2
2 if(HAVE_DPMS)
3   include_directories( ${X11_dpms_INCLUDE_PATH}   )
4 endif(HAVE_DPMS)
6 set( kded_powerdevil_SRCS
7     PowerDevilDaemon.cpp
8     AbstractSystemPoller.cpp
9     WidgetBasedPoller.cpp
10     XSyncBasedPoller.cpp
11     TimerBasedPoller.cpp
12     PollSystemLoader.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 
36     ${KDE4_KDECORE_LIBS} 
37     ${KDE4_SOLID_LIBS}
38     ${KDE4_KDEUI_LIBS}
39     solidcontrol
42 if(X11_Xss_LIB)
43   target_link_libraries(kded_powerdevil ${X11_Xss_LIB})
44 endif(X11_Xss_LIB)
46 if(X11_Xext_LIB)
47   target_link_libraries(kded_powerdevil ${X11_Xext_LIB})
48 endif(X11_Xext_LIB)
50 if(X11_XTest_FOUND)
51   target_link_libraries(kded_powerdevil ${X11_XTest_LIB})
52 endif(X11_XTest_FOUND)
54 if(HAVE_DPMS)
55   target_link_libraries(kded_powerdevil ${X11_LIBRARIES})
56 endif(HAVE_DPMS)
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} )