kde-workspace/ksmserver/CMakeLists.txt
Ivailo Monev 6f288381c1 ksmserver: drop legacy session support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-20 09:14:40 +03:00

89 lines
2.3 KiB
CMake

project(ksmserver)
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1218)
include_directories(
${CMAKE_SOURCE_DIR}/libs
${KDECLARATIVE_INCLUDE_DIR}
# for kworkspace_export.h
${CMAKE_BINARY_DIR}/libs/kworkspace
)
add_subdirectory( kcm )
if(ENABLE_TESTING)
add_subdirectory(tests)
endif()
check_library_exists(ICE _IceTransNoListen "" HAVE__ICETRANSNOLISTEN)
configure_file(config-ksmserver.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksmserver.h)
########### next target ###############
set(ksmserver_SRCS
main.cpp
server.cpp
shutdowndlg.cpp
startup.cpp
shutdown.cpp
client.cpp
)
set(kcminit_adaptor ${CMAKE_SOURCE_DIR}/kcminit/main.h)
set(kcminit_xml ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KCMinit.xml)
qt4_generate_dbus_interface(${kcminit_adaptor} ${kcminit_xml})
qt4_add_dbus_interface( ksmserver_SRCS ${kcminit_xml} kcminit_interface )
# This is actually now disabled, because OrgKDEKlauncherInterface is also provided
# by kdecore, it is not autogenerated and is not binary compatible with a currently
# generated version, thus at certain circumstances leading to strange crashes.
# This should be fixed for KDE5.
# KLauchner.xml is installed by kdelibs, so it is in KDE4_DBUS_INTERFACES_INSTALL_DIR
# set(klauncher_xml ${KDE4_DBUS_INTERFACES_INSTALL_DIR}/org.kde.KLauncher.xml)
# qt4_add_dbus_interface( ksmserver_SRCS ${klauncher_xml} klauncher_interface )
qt4_add_dbus_adaptor(ksmserver_SRCS org.kde.KSMServerInterface.xml server.h KSMServer)
add_executable(ksmserver ${ksmserver_SRCS})
target_link_libraries(ksmserver
KDE4::plasma
KDE4::kdeui
KDE4::kio
KDE4::solid
KDE4::kdeclarative
${QT_QTDECLARATIVE_LIBRARY}
${X11_LIBRARIES}
kworkspace
)
install(
TARGETS ksmserver
DESTINATION ${KDE4_BIN_INSTALL_DIR}
)
########### next target ###############
set(kcheckrunning_SRCS
kcheckrunning.cpp
)
add_executable(kcheckrunning ${kcheckrunning_SRCS})
target_link_libraries(kcheckrunning ${X11_LIBRARIES})
install(
TARGETS kcheckrunning
DESTINATION ${KDE4_BIN_INSTALL_DIR}
)
########### install files ###############
install(
FILES org.kde.KSMServerInterface.xml
DESTINATION ${KDE4_DBUS_INTERFACES_INSTALL_DIR}
)
install(
DIRECTORY themes/
DESTINATION ${KDE4_DATA_INSTALL_DIR}/ksmserver/themes
)