Start porting RSIBreak.
[rsibreak.git] / src / CMakeLists.txt
blobcac88bb6cabe8ca78ddf2d951a3a1bf17a5be88c
1 INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} )
3 ############# Find LIBXSS for idle detection and write outcome to config.h ####
5 include (CheckLibraryExists)
6 check_library_exists(Xss XScreenSaverQueryInfo "" HAVE_LIBXSS)
8 # Not having libxss is fatal at the moment.
9 IF (NOT HAVE_LIBXSS)
10      MESSAGE(FATAL_ERROR "Missing libxss library")
11 ELSE (NOT HAVE_LIBXSS)
12     SET (IDLE_DETECTION_LIB "Xss")
13 ENDIF (NOT HAVE_LIBXSS)
15 # Write it down to the config.h
16 CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/config.h.cmake
17                 ${CMAKE_BINARY_DIR}/src/config.h    )
19 ############ librsibreak #####################################################
21 ADD_LIBRARY(librsibreak STATIC rsitimer_dpms.cpp)
23 ############ rsibreak ########################################################
25 # source files needed
26 SET(rsibreak_sources
27 rsidock.cpp
28 setup.cpp
29 setupgeneral.cpp
30 setuptiming.cpp
31 main.cpp
32 rsiwidget.cpp
33 rsitimer.cpp
34 rsirelaxpopup.cpp
35 setupmaximized.cpp
36 rsitooltip.cpp
37 rsistatwidget.cpp
38 rsistats.cpp
39 rsiglobals.cpp
40 rsistatitem.cpp
43 # compilation
44 KDE4_ADD_EXECUTABLE(rsibreak ${rsibreak_sources})
46 ########### linking #####################
48 TARGET_LINK_LIBRARIES(rsibreak kio kdeui librsibreak ${IDLE_DETECTION_LIB})
50 ########### install files ###############
52 INSTALL_TARGETS(/bin rsibreak )
53 INSTALL_FILES( /share/applications/kde FILES  rsibreak.desktop )
54 #TODO is this still in KDE4? 
55 #INSTALL_FILES( /share/autostart FILES  rsibreak.desktop )