CMakeLists.txt 1.54 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
cmake_minimum_required(VERSION 3.0)
Marco Martin's avatar
Marco Martin committed
2

3
set(PROJECT_VERSION "5.12.80")
4

Laurent Montel's avatar
Laurent Montel committed
5
project(systemsettings VERSION ${PROJECT_VERSION})
6
set(QT_MIN_VERSION "5.7.0")
7
set(KF5_MIN_VERSION "5.30")
8

Laurent Montel's avatar
Laurent Montel committed
9
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
10
11
12
13
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

include(KDEInstallDirs)
include(KDECMakeSettings)
14
include(KDECompilerSettings NO_POLICY_SCOPE)
Laurent Montel's avatar
Laurent Montel committed
15
include(GenerateExportHeader)
Marco Martin's avatar
Marco Martin committed
16
include(ECMQMLModules)
Laurent Montel's avatar
Laurent Montel committed
17
include(ECMQtDeclareLoggingCategory)
18
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
19
20
21
22
add_definitions(-DQT_USE_QSTRINGBUILDER)
add_definitions(-DQT_NO_CAST_FROM_ASCII)
add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
23
24

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Marco Martin's avatar
Marco Martin committed
25
    Widgets Quick Qml QuickWidgets
26
)
27

28
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
29
30
31
32
33
34
    ItemViews
    KCMUtils
    I18n
    KIO
    Service
    IconThemes
35
    WidgetsAddons
36
37
38
39
    WindowSystem
    XmlGui
    DBusAddons
    Config
Laurent Montel's avatar
Laurent Montel committed
40
    DocTools
Marco Martin's avatar
Marco Martin committed
41
    Package
42
    Declarative
43
44
    Activities
    ActivitiesStats
45
46
47
    OPTIONAL_COMPONENTS
    KHtml
    QUIET
48
)
49

Marco Martin's avatar
Marco Martin committed
50
51
ecm_find_qmlmodule(org.kde.kcm 1.0)

Marco Martin's avatar
Marco Martin committed
52
find_package(KF5Kirigami2 2.1 REQUIRED)
Marco Martin's avatar
Marco Martin committed
53

Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
54
55
56
57
add_subdirectory(core)
add_subdirectory(app)
add_subdirectory(categories)
add_subdirectory(icons)
58
add_subdirectory(sidebar)
59
60
add_subdirectory(doc)

61
62
63
64
if(KF5KHtml_FOUND)
    add_subdirectory(classic)
endif()

Laurent Montel's avatar
Laurent Montel committed
65
66
install(FILES systemsettings.categories DESTINATION ${KDE_INSTALL_CONFDIR})

67
68
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)