CMakeLists.txt 1.98 KB
Newer Older
1
project(sddm-kcm)
David Edmundson's avatar
David Edmundson committed
2
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
3
set(PROJECT_VERSION "5.14.80")
Eike Hein's avatar
Eike Hein committed
4
set(QT_MIN_VERSION "5.4.0")
David Edmundson's avatar
David Edmundson committed
5 6 7 8 9
find_package(ECM 1.0.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECMakeSettings)
10
include(KDECompilerSettings NO_POLICY_SCOPE)
David Edmundson's avatar
David Edmundson committed
11
include(FeatureSummary)
Reza Shah's avatar
Reza Shah committed
12

Andreas Sturmlechner's avatar
Andreas Sturmlechner committed
13
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets X11Extras Quick QuickWidgets)
David Edmundson's avatar
David Edmundson committed
14 15 16 17 18

find_package(KF5 REQUIRED COMPONENTS
    CoreAddons
    I18n
    XmlGui
David Edmundson's avatar
David Edmundson committed
19
    Auth
20 21
    ConfigWidgets
    KIO
22 23
    Archive
    NewStuff
Reza Shah's avatar
Reza Shah committed
24 25
)

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

find_package(X11)
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
                        URL "http://www.x.org"
                        TYPE REQUIRED
                        PURPOSE "Required for building the X11 based workspace"
                      )

find_package(XCB
    REQUIRED COMPONENTS
        XCB SHM IMAGE
    OPTIONAL_COMPONENTS
        XKB
)


42
add_definitions(-DTRANSLATION_DOMAIN=\"kcm_sddm\")
43
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
44

45
install(FILES kcm_sddm.desktop DESTINATION ${CMAKE_INSTALL_KSERVICES5DIR})
46

David Edmundson's avatar
David Edmundson committed
47
kauth_install_actions(org.kde.kcontrol.kcmsddm kcm_sddm.actions)
Abdurrahman AVCI's avatar
Abdurrahman AVCI committed
48

49
add_executable(kcmsddm_authhelper sddmauthhelper.cpp)
50
target_link_libraries(kcmsddm_authhelper KF5::Auth KF5::ConfigCore KF5::Archive KF5::I18n)
David Edmundson's avatar
David Edmundson committed
51 52

kauth_install_helper_files(kcmsddm_authhelper org.kde.kcontrol.kcmsddm root)
David Edmundson's avatar
David Edmundson committed
53
install(TARGETS kcmsddm_authhelper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
Reza Shah's avatar
Reza Shah committed
54

55 56 57 58 59 60 61 62 63 64 65 66 67
#installer tool for knewstuff
add_executable(sddmthemeinstaller
    sddmthemeinstaller.cpp
)

target_link_libraries(sddmthemeinstaller
    KF5::I18n
    KF5::Auth
    KF5::CoreAddons
    KF5::ConfigCore
    KF5::WidgetsAddons)
install(TARGETS sddmthemeinstaller ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})

David Edmundson's avatar
David Edmundson committed
68
add_subdirectory(src)
69
install(FILES sddmtheme.knsrc DESTINATION ${KDE_INSTALL_CONFDIR})
70 71 72

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)