3 #We check if X11_Xscreensaver was found
4 if(X11_Xscreensaver_FOUND)
5 message(STATUS "Found the X11 screensaver extension")
6 macro_bool_to_01(X11_Xscreensaver_LIB HAVE_LIBXSS)
8 message(STATUS "The X11 screensaver extension was NOT found.")
11 add_feature_info("KtimeTracker idle detection" X11_Xscreensaver_FOUND "Measure the screen idle time in KTimeTracker")
13 configure_file(config-ktimetracker.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ktimetracker.h )
15 add_subdirectory( support )
16 add_subdirectory( pics )
18 include_directories( ${CMAKE_SOURCE_DIR}/kresources/remote )
21 ########### next target ###############
22 set(ktimetracker_shared_SRCS ktimetrackerconfigdialog.cpp
23 desktoptracker.cpp ktimetrackerpart.cpp
24 edittaskdialog.cpp idletimedetector.cpp
25 timekard.cpp ktimetrackerutility.cpp
26 timetrackerstorage.cpp mainwindow.cpp preferences.cpp
27 task.cpp taskview.cpp tray.cpp focusdetector.cpp
28 csvexportdialog.cpp plannerparser.cpp historydialog.cpp
29 treeviewheadercontextmenu.cpp timetrackerwidget.cpp
30 focusdetectornotifier.cpp kttcalendar.cpp
33 qt4_add_dbus_adaptor( ktimetracker_shared_SRCS
34 org.kde.ktimetracker.ktimetracker.xml
40 qt4_add_dbus_adaptor( ktimetracker_shared_SRCS
41 org.kde.ktimetracker.storage.xml
47 kde4_add_ui_files( ktimetracker_shared_SRCS
48 csvexportdialog_base.ui
55 kde4_add_kcfg_files( ktimetracker_shared_SRCS ktimetracker.kcfgc )
57 set(ktimetracker_SRCS main.cpp ${ktimetracker_shared_SRCS})
59 kde4_add_executable(karm karm.cpp)
61 kde4_add_app_icon(ktimetracker_SRCS "hi*-app-ktimetracker.png")
63 kde4_add_executable(ktimetracker ${ktimetracker_SRCS})
66 target_link_libraries(karm ${KDE4_KIO_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDEPIMLIBS_KONTACTINTERFACE_LIBS} )
68 target_link_libraries(ktimetracker ${KDE4_KCMUTILS_LIBS} ${KDE4_KPARTS_LIBRARY} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDEPIMLIBS_KONTACTINTERFACE_LIBS} ${X11_X11_LIB})
69 if(X11_Xscreensaver_LIB)
70 target_link_libraries(ktimetracker ${X11_Xscreensaver_LIB} )
73 install( TARGETS karm ${INSTALL_TARGETS_DEFAULT_ARGS} )
74 install( TARGETS ktimetracker ${INSTALL_TARGETS_DEFAULT_ARGS} )
79 set(kcm_ktimetracker_PART_SRCS ${ktimetracker_shared_SRCS})
81 kde4_add_plugin(kcm_ktimetracker ${kcm_ktimetracker_PART_SRCS})
83 target_link_libraries(kcm_ktimetracker ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KCMUTILS_LIBS} ${KDE4_KPARTS_LIBRARY} ${KDEPIMLIBS_KCALCORE_LIBS} ${X11_X11_LIB})
84 if(X11_Xscreensaver_LIB)
85 target_link_libraries(kcm_ktimetracker ${X11_Xscreensaver_LIB} )
88 install(TARGETS kcm_ktimetracker DESTINATION ${PLUGIN_INSTALL_DIR})
92 ########### next target ###############
94 set(ktimetrackerpart_PART_SRCS ${ktimetracker_shared_SRCS})
96 kde4_add_plugin(ktimetrackerpart ${ktimetrackerpart_PART_SRCS})
98 target_link_libraries(ktimetrackerpart ${KDE4_KCMUTILS_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KPARTS_LIBS} ${X11_X11_LIB})
99 if(X11_Xscreensaver_LIB)
100 target_link_libraries(ktimetrackerpart ${X11_Xscreensaver_LIB})
104 install(TARGETS ktimetrackerpart DESTINATION ${PLUGIN_INSTALL_DIR})
107 ########### install files ###############
108 install( FILES ktimetracker_config_behavior.desktop ktimetracker_config_display.desktop ktimetracker_config_storage.desktop DESTINATION ${SERVICES_INSTALL_DIR})
110 install( FILES ktimetrackerpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
111 install( FILES ktimetrackerui.rc DESTINATION ${DATA_INSTALL_DIR}/ktimetracker )
113 kde4_install_icons( ${ICON_INSTALL_DIR} )
114 install( FILES org.kde.ktimetracker.ktimetracker.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )