-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
95 lines (76 loc) · 2.18 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
cmake_minimum_required(VERSION 3.16)
project(bluedevil)
set(PROJECT_VERSION "6.3.80")
set(PROJECT_VERSION_MAJOR 6)
set(PROJECT_DEP_VERSION "6.2.90")
set(QT_MIN_VERSION "6.7.0")
set(KF6_MIN_VERSION "6.10.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
DBus
Qml
Widgets
)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
BluezQt
CoreAddons
DBusAddons
I18n
JobWidgets
KCMUtils
KIO
Notifications
Service
Svg
WidgetsAddons
WindowSystem
)
find_package(Plasma ${PROJECT_DEP_VERSION} REQUIRED)
find_package(SharedMimeInfo REQUIRED)
find_package(KF6DocTools ${KF6_MIN_VERSION})
set_package_properties(KF6DocTools PROPERTIES
DESCRIPTION "Tools to generate documentation"
TYPE OPTIONAL
)
find_package(KF6Kirigami ${KF6_MIN_VERSION} CONFIG)
set_package_properties(KF6Kirigami PROPERTIES
TYPE RUNTIME
)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMOptionalAddSubdirectory)
include(FeatureSummary)
include(KDEClangFormat)
include(ECMSetupVersion)
include(ECMQtDeclareLoggingCategory)
include(ECMQmlModule)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055900)
include(KDEGitCommitHooks)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX BLUEDEVIL
VERSION_HEADER ${CMAKE_BINARY_DIR}/version.h
)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(src)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
ecm_qt_install_logging_categories(
EXPORT BLUEDEVIL
FILE bluedevil.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)
if(KF6DocTools_FOUND)
add_subdirectory(doc)
kdoctools_install(po)
endif()
ki18n_install(po)