-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
59 lines (40 loc) · 1.42 KB
/
Copy pathCMakeLists.txt
File metadata and controls
59 lines (40 loc) · 1.42 KB
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
# SPDX-FileCopyrightText: 2025-2026 Robert French <frenchrobertm@outlook.com>
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.22)
file(READ "version.txt" APP_VERSION)
project(qt6-controllable VERSION ${APP_VERSION})
option(BUILD_EXAMPLE_APP "builds example app for testing the module" OFF)
### Set up and install Qt/KDE dependencies ###
set(QT6_MIN_VERSION 6.7.0)
set(KF6_MIN_VERSION 6.12.0)
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMFindQmlModule)
include(ECMQmlModule)
find_package(Qt6 ${QT6_MIN_VERSION} REQUIRED COMPONENTS
Core
Gui
Qml
Widgets
QuickControls2
)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
I18n
Config
)
find_package(SDL3 REQUIRED)
include(KDEGitCommitHooks)
include(KDEClangFormat)
add_subdirectory(src)
# TODO: create proper tests
install(FILES io.github.rfrench3.controllable.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)