-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
91 lines (72 loc) · 2.44 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
cmake_minimum_required(VERSION 3.16)
# Release Service version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "24")
set (RELEASE_SERVICE_VERSION_MINOR "11")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}")
# Bump KAPPTEMPLATE_BASE_VERSION once new features are added
set(KAPPTEMPLATE_BASE_VERSION "0.1")
set(KAPPTEMPLATE_VERSION "${KAPPTEMPLATE_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}")
project(kapptemplate VERSION ${KAPPTEMPLATE_VERSION})
set(QT_MIN_VERSION "6.5.0")
set(KF_MIN_VERSION "6.0.0")
find_package(ECM ${KF_MIN_VERSION} NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMAddTests)
include(ECMQtDeclareLoggingCategory)
include(KDEPackageAppTemplates)
include(ECMDeprecationSettings)
include(KDEClangFormat)
include(KDEGitCommitHooks)
include(FeatureSummary)
if (BUILD_TESTING)
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
endif()
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Widgets Quick)
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
ConfigWidgets
Completion
Archive
KIO
I18n
DocTools
# NewStuff
)
find_package(KF6KirigamiAddons 1.4.0 REQUIRED)
set_package_properties(KF6KirigamiAddons PROPERTIES
TYPE REQUIRED
PURPOSE "Required application components and runtime dependency"
)
qt_policy(SET QTP0001 NEW)
ecm_set_disabled_deprecation_versions(
QT 6.5
KF 6.0
)
# aded by KDE_COMPILERSETTINGS_LEVEL 5.85
remove_definitions(
-DQT_NO_CAST_FROM_ASCII
)
add_subdirectory(doc)
add_subdirectory(icons)
add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
ki18n_install(po)
kdoctools_install(po)
# Excluding templates, because clang-format doesn't know how to handle ${templated} code
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES
${PROJECT_SOURCE_DIR}/src/application/*.cpp
${PROJECT_SOURCE_DIR}/src/application*.h
${PROJECT_SOURCE_DIR}/tests/*.cpp
${PROJECT_SOURCE_DIR}/tests/*.h
)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)