not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / ksmserver / CMakeLists.txt
blob9c8b592027e4c542618bd1cff73e38854f137b4c
1 add_subdirectory( kcm )
2 add_subdirectory( tests )
4 include_directories(
5    ${KDEBASE_WORKSPACE_SOURCE_DIR}/libs
6    ${KDEBASE_WORKSPACE_SOURCE_DIR}/solid/control/
7    ${QIMAGEBLITZ_INCLUDES}
10 check_library_exists(ICE _IceTransNoListen "" HAVE__ICETRANSNOLISTEN)
11 configure_file(config-ksmserver.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksmserver.h)
13 ########### next target ###############
15 set(ksmserver_KDEINIT_SRCS
16    main.cpp
17    server.cpp
18    shutdowndlg.cpp
19    legacy.cpp
20    startup.cpp
21    shutdown.cpp
22    client.cpp
23    logouteffect.cpp
24    fadeeffect.cpp
25    curtaineffect.cpp)
27 INCLUDE(CheckCCompilerFlag)
28 CHECK_CXX_COMPILER_FLAG(-mmmx HAVE_MMMX)
30 if (HAVE_MMMX)
31    SET_SOURCE_FILES_PROPERTIES(fadeeffect.cpp PROPERTIES COMPILE_FLAGS -mmmx)
32 endif (HAVE_MMMX)
34 set(kcminit_adaptor ${CMAKE_CURRENT_SOURCE_DIR}/../kcminit/main.h)
35 set(kcminit_xml ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KCMinit.xml)
36 add_custom_command(OUTPUT ${kcminit_xml}
37        COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${kcminit_adaptor} > ${kcminit_xml}
38        DEPENDS ${kcminit_adaptor})
39 qt4_add_dbus_interface( ksmserver_KDEINIT_SRCS ${kcminit_xml} kcminit_interface )
41 # KLauchner.xml is installed by kdelibs, so it is in KDE4_DBUS_INTERFACES_DIR
42 set(klauncher_xml  ${KDE4_DBUS_INTERFACES_DIR}/org.kde.KLauncher.xml)
43 qt4_add_dbus_interface( ksmserver_KDEINIT_SRCS ${klauncher_xml} klauncher_interface )
45 qt4_add_dbus_adaptor( ksmserver_KDEINIT_SRCS org.kde.KSMServerInterface.xml server.h KSMServer )
47 kde4_add_kdeinit_executable( ksmserver ${ksmserver_KDEINIT_SRCS})
49 target_link_libraries(kdeinit_ksmserver ${KDE4_PLASMA_LIBS} solidcontrol kworkspace
50    ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${QIMAGEBLITZ_LIBRARIES} ${KDE4_SOLID_LIBS} ${X11_LIBRARIES} ${X11_Xrender_LIB}
53 install(TARGETS kdeinit_ksmserver ${INSTALL_TARGETS_DEFAULT_ARGS})
55 install(TARGETS ksmserver ${INSTALL_TARGETS_DEFAULT_ARGS})
57 ########### next target ###############
59 set(kcheckrunning_SRCS
60    kcheckrunning.cpp)
62 kde4_add_executable( kcheckrunning ${kcheckrunning_SRCS})
64 target_link_libraries(kcheckrunning ${X11_LIBRARIES})
66 install(TARGETS kcheckrunning ${INSTALL_TARGETS_DEFAULT_ARGS})
68 ########### install files ###############
70 install( FILES ksmserver.upd DESTINATION  ${KCONF_UPDATE_INSTALL_DIR} )
71 install( PROGRAMS move_session_config.sh DESTINATION  ${KCONF_UPDATE_INSTALL_DIR} )
72 install( FILES org.kde.KSMServerInterface.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})