-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
78 lines (55 loc) · 2.24 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
# SPDX-FileCopyrightText: 2024 Manuel Alcaraz Zambrano <[email protected]>
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(chessament VERSION 0.1)
include(FeatureSummary)
set(QT6_MIN_VERSION 6.8.0)
set(KF6_MIN_VERSION 6.8.0)
set(KIRIGAMI_ADDONS_MIN_VERSION 1.6.0)
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings NO_POLICY_SCOPE)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMAddTests)
include(ECMSetupVersion)
include(ECMFindQmlModule)
include(ECMQmlModule)
include(ECMDeprecationSettings)
include(KDEGitCommitHooks)
include(KDEClangFormat)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX CHESSAMENT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/version-chessament.h"
)
ecm_set_disabled_deprecation_versions(
QT ${QT6_MIN_VERSION}
KF ${KF6_MIN_VERSION}
)
find_package(Qt6 ${QT6_MIN_VERSION} REQUIRED COMPONENTS Core Gui Qml QuickControls2 Sql Svg WebEngineQuick Widgets)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS Kirigami CoreAddons Config I18n ItemModels)
find_package(QCoro6 REQUIRED COMPONENTS Core)
qcoro_enable_coroutines()
find_package(KF6KirigamiAddons ${KIRIGAMI_ADDONS_MIN_VERSION} REQUIRED)
set_package_properties(KF6KirigamiAddons PROPERTIES
TYPE REQUIRED
PURPOSE "Required application components and runtime dependency"
)
qt_policy(SET QTP0001 NEW)
ecm_find_qmlmodule(org.kde.kirigamiaddons.formcard)
ecm_find_qmlmodule(org.kde.kirigamiaddons.statefulapp)
add_subdirectory(src)
if(BUILD_TESTING)
find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE COMPONENTS Test)
add_subdirectory(autotests)
endif()
install(FILES dev.alcarazzam.chessament.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES dev.alcarazzam.chessament.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
ki18n_install(po)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES 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)