-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
103 lines (83 loc) · 2.74 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
cmake_minimum_required(VERSION 3.16)
# 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}")
project(kwordquiz VERSION ${RELEASE_SERVICE_VERSION})
if(NOT MSVC)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wno-switch -O2 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wno-switch -O2")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wno-switch -g3 -ggdb -O0" CACHE STRING "Debug options." FORCE)
endif(NOT MSVC)
include(FeatureSummary)
set(KF_MIN_VERSION "5.240.0")
set(REQUIRED_QT_VERSION "6.5.0")
find_package(ECM ${KF_MIN_VERSION} NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
include(ECMAddAppIcon)
include(KDEClangFormat)
include(ECMSetupVersion)
include(ECMAddTests)
include(ECMDeprecationSettings)
include(KDEGitCommitHooks)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE COMPONENTS
Core
Widgets
PrintSupport
Quick
QuickControls2
Qml
Svg
Multimedia
Xml
)
set_package_properties(Qt6 PROPERTIES
TYPE REQUIRED
PURPOSE "Base application components"
)
find_package(KF6 ${KF_MIN_VERSION} COMPONENTS
I18n
Crash
Config
DocTools
NewStuff
Kirigami
DBusAddons
)
set_package_properties(KF6 PROPERTIES
TYPE REQUIRED
PURPOSE "Base application components"
)
find_package(KF6KirigamiAddons 0.11.0)
set_package_properties(KF6KirigamiAddons PROPERTIES
TYPE REQUIRED
PURPOSE "Kirigami addons application UI framework"
)
include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
find_package(LibKEduVocDocument REQUIRED)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
ecm_set_disabled_deprecation_versions(QT 6.8.0 KF 6.5.0)
add_subdirectory(doc)
add_subdirectory(src)
if(BUILD_TESTING)
find_package(Qt6Test REQUIRED)
add_subdirectory(autotests)
endif()
ki18n_install(po)
if (KF5DocTools_FOUND)
kdoctools_install(po)
endif()
install(FILES org.kde.kwordquiz.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install(FILES org.kde.kwordquiz.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)