CMakeLists.txt 2.54 KB
Newer Older
Lukáš Tinkl's avatar
Lukáš Tinkl committed
1
2
add_definitions(-DTRANSLATION_DOMAIN=\"ksmserver\")

3
4
5
check_library_exists(ICE _IceTransNoListen "" HAVE__ICETRANSNOLISTEN)
configure_file(config-ksmserver.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksmserver.h)

Laurent Montel's avatar
Laurent Montel committed
6
7
8
9
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)

10
11
include_directories(${CMAKE_CURRENT_BINARY_DIR})

12
13
14
15
16
########### next target ###############

set(ksmserver_KDEINIT_SRCS
    main.cpp
    server.cpp
17
    legacy.cpp
18
    logout.cpp
19
20
    client.cpp
)
21
ecm_qt_declare_logging_category(ksmserver_KDEINIT_SRCS HEADER ksmserver_debug.h IDENTIFIER KSMSERVER CATEGORY_NAME org.kde.kf5.ksmserver)
22

23
24
25
qt5_add_dbus_adaptor( ksmserver_KDEINIT_SRCS org.kde.KSMServerInterface.xml server.h KSMServer )
qt5_add_dbus_interface( ksmserver_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface )
qt5_add_dbus_interface( ksmserver_KDEINIT_SRCS org.kde.LogoutPrompt.xml logoutprompt_interface)
26
27
28
29

set(klauncher_xml ${KINIT_DBUS_INTERFACES_DIR}/kf5_org.kde.KLauncher.xml)
qt5_add_dbus_interface( ksmserver_KDEINIT_SRCS ${klauncher_xml} klauncher_interface )

30
31
qt5_add_dbus_interface( ksmserver_KDEINIT_SRCS ../startkde/plasma-session/org.kde.Startup.xml startup_interface )
qt5_add_dbus_interface( ksmserver_KDEINIT_SRCS ../startkde/plasma-session/org.kde.Shutdown.xml shutdown_interface )
32
33
34

kf5_add_kdeinit_executable( ksmserver ${ksmserver_KDEINIT_SRCS})

35
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KSMServerDBusInterface")
36

37
configure_package_config_file(KSMServerDBusInterfaceConfig.cmake.in
38
    ${CMAKE_CURRENT_BINARY_DIR}/KSMServerDBusInterfaceConfig.cmake
39
    PATH_VARS KDE_INSTALL_DBUSINTERFACEDIR
40
41
42
    INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})

target_link_libraries(kdeinit_ksmserver
43
    PW::KScreenLocker
44
45
46
    PW::KWorkspace
    KF5::XmlGui
    KF5::GlobalAccel
47
    KF5::I18n
48
49
50
51
52
53
54
55
56
    KF5::KIOCore
    KF5::KIOWidgets
    ${X11_LIBRARIES}
    ${X11_Xrender_LIB}
    Qt5::X11Extras
    KF5::Solid
    Qt5::Quick
    KF5::Declarative
    KF5::DBusAddons
57
    KF5::Notifications
58
    KF5::Package
59
    KF5::WindowSystem
60
    Qt5::Concurrent
61
62
)

63
install(TARGETS kdeinit_ksmserver ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
64

65
install(TARGETS ksmserver ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
66
67
68
69
70
71
72

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KSMServerDBusInterfaceConfig.cmake
    DESTINATION ${CMAKECONFIG_INSTALL_DIR})


########### install files ###############

73
install( FILES org.kde.KSMServerInterface.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})