-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
CMakeLists.txt
106 lines (89 loc) · 3.01 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# KTouch CMakeLists.txt file
#
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "25")
set (RELEASE_SERVICE_VERSION_MINOR "03")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
cmake_minimum_required(VERSION 3.16)
project(ktouch VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.15.2")
set(KF5_MIN_VERSION "5.91.0")
set (KDE_COMPILERSETTINGS_LEVEL "5.82.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
find_package(KF5DocTools)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} )
include(KDEInstallDirs)
include(ECMAddTests)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(ECMOptionalAddSubdirectory)
include(ECMSetupVersion)
include(FeatureSummary)
include(ECMDeprecationSettings)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS
Core
Gui
Qml
Quick
QuickWidgets
QuickControls2
Sql
Widgets
Xml
XmlPatterns
)
find_package(Qt${QT_MAJOR_VERSION} CONFIG QUIET OPTIONAL_COMPONENTS QuickCompiler)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Completion
Config
ConfigWidgets
CoreAddons
DocTools
I18n
ItemViews
KCMUtils
TextWidgets
WidgetsAddons
WindowSystem
XmlGui
IconThemes
)
find_package(KQtQuickCharts)
set_package_properties(KQtQuickCharts PROPERTIES
DESCRIPTION "QtQuick plugin to render beautiful and interactive charts"
URL "https://commits.kde.org/kqtquickcharts"
TYPE RUNTIME
)
option(COMPILE_QML "Precompile QML code" OFF)
option(WITHOUT_X11 "Build without X11 Keyboard Layout Detection (skips finding X11)" OFF)
if (NOT WITHOUT_X11)
find_package(X11)
find_package(XCB OPTIONAL_COMPONENTS XCB XKB)
if (QT_MAJOR_VERSION STREQUAL "5")
find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG)
endif()
if (Qt5X11Extras_FOUND AND X11_FOUND AND X11_Xkbfile_FOUND AND X11_Xkb_FOUND AND XCB_FOUND AND XCB_XKB_FOUND)
set(KTOUCH_BUILD_WITH_X11 TRUE)
endif()
add_feature_info ("Keyboard Layout Detection" KTOUCH_BUILD_WITH_X11 "needs Qt5X11Extras, libX11, libxkb, libxkbfile, libxcb, and libxcb-xkb")
endif()
# enable QML debugging for debug builds
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG")
ecm_set_disabled_deprecation_versions(QT 5.15.2 KF 5.101.0)
# subdirectories to build
ecm_optional_add_subdirectory(data)
ecm_optional_add_subdirectory(doc)
ecm_optional_add_subdirectory(src)
# ecm_optional_add_subdirectory(sounds)
ecm_optional_add_subdirectory(icons)
# files to install in the ktouch project root directory
ki18n_install(po)
if (KF5DocTools_FOUND)
kdoctools_install(po)
endif()
install( PROGRAMS org.kde.ktouch.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install(FILES org.kde.ktouch.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)