-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
110 lines (89 loc) · 2.71 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
104
105
106
107
108
109
110
# vim:set softtabstop=3 shiftwidth=3 tabstop=3 expandtab:
cmake_minimum_required(VERSION 3.16)
project(PlasmaVault)
set(PROJECT_VERSION "6.2.80")
set(PROJECT_VERSION_MAJOR 6)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PLASMAVAULT_VERSION "0.1")
# We don't build in-source
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(
FATAL_ERROR
"plasmavault requires an out of source build. Please create a separate build directory and run 'cmake path_to_plasma [options]' there."
)
endif()
# Extra CMake stuff
include(FeatureSummary)
set(PROJECT_DEP_VERSION "6.2.0")
set(QT_MIN_VERSION "6.7.0")
set(KF6_MIN_VERSION "6.5.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
find_package(ECM ${KF6_MIN_VERSION} NO_MODULE)
set_package_properties(ECM PROPERTIES
TYPE REQUIRED
DESCRIPTION "Extra CMake Modules."
URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules"
)
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(KDEClangFormat)
include(KDEGitCommitHooks)
include(ECMDeprecationSettings)
# Qt
set(CMAKE_AUTOMOC ON)
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
DBus
Quick
Widgets
)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
Config
ConfigWidgets
CoreAddons
DBusAddons
I18n
ItemModels
KIO
Service
WidgetsAddons
)
find_package(Plasma ${PROJECT_DEP_VERSION} REQUIRED)
find_package(PlasmaActivities ${PROJECT_DEP_VERSION} REQUIRED)
find_package(KF6NetworkManagerQt ${KF6_MIN_VERSION})
if (KF6NetworkManagerQt_FOUND)
set(HAVE_NETWORKMANAGER TRUE)
endif()
find_package(KSysGuard REQUIRED)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/common
)
include(ECMSetupVersion)
ecm_set_disabled_deprecation_versions(QT 6.8.1
KF 6.9.0
)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DTRANSLATION_DOMAIN=\"plasmavault-kde\")
add_definitions(-fexceptions)
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ki18n_install(po)
endif()
# libPlasmaVault
add_subdirectory(kded)
add_subdirectory(plasma)
add_subdirectory(icons)
add_subdirectory(fileitemplugin)
# 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)
# Write out the features
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)