-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
CMakeLists.txt
146 lines (113 loc) · 3.73 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
cmake_minimum_required(VERSION 3.16)
project(plasma-networkmanagement)
set(PROJECT_VERSION "6.2.80")
set(PROJECT_VERSION_MAJOR 6)
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")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
################# set KDE specific information #################
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
option(BUILD_OPENCONNECT "Build OpenConnect VPN plugin" ON)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(ECMFindQmlModule)
include(ECMQmlModule)
include(KDEGitCommitHooks)
include(ECMQtDeclareLoggingCategory)
include(FeatureSummary)
include(GenerateExportHeader)
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
DBus
Gui
Network
Quick
QuickWidgets
Widgets
)
find_package(PkgConfig REQUIRED)
if(BUILD_OPENCONNECT)
pkg_check_modules(OPENCONNECT IMPORTED_TARGET openconnect>=3.99)
if(NOT TARGET PkgConfig::OPENCONNECT)
set(BUILD_OPENCONNECT OFF)
endif()
endif()
if(BUILD_OPENCONNECT)
find_package(Qt6WebEngineWidgets ${QT_MIN_VERSION} CONFIG REQUIRED)
endif()
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED
ColorScheme
Completion
CoreAddons
DBusAddons
KIO
I18n
NetworkManagerQt
Notifications
Service
Solid
Wallet
WidgetsAddons
WindowSystem
KCMUtils
Svg
ModemManagerQt
)
find_package(Plasma ${PROJECT_DEP_VERSION} REQUIRED)
ecm_find_qmlmodule(org.kde.prison 1.0)
find_package(KF6Kirigami ${KF6_MIN_VERSION} CONFIG)
set_package_properties(KF6Kirigami PROPERTIES
DESCRIPTION "A QtQuick based components set"
PURPOSE "Required at runtime by the KCMs"
TYPE RUNTIME
)
find_package(Qca-qt6 2.1.0)
set_package_properties(Qca-qt6 PROPERTIES DESCRIPTION "Support for encryption"
URL "https://download.kde.org/stable/qca-qt5/"
TYPE REQUIRED)
find_package(KF6Prison ${KF6_MIN_VERSION})
set_package_properties(KF6Prison PROPERTIES DESCRIPTION "Prison library"
URL "https://commits.kde.org/prison"
TYPE RUNTIME
PURPOSE "Needed to create mobile barcodes for WiFi networks"
)
pkg_check_modules(NETWORKMANAGER IMPORTED_TARGET libnm>1.4.0 REQUIRED)
pkg_check_modules(MOBILEBROADBANDPROVIDERINFO mobile-broadband-provider-info)
pkg_get_variable(BROADBANDPROVIDER_DATABASE mobile-broadband-provider-info database)
find_package(QCoro6 REQUIRED COMPONENTS Core DBus)
qcoro_enable_coroutines()
add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055800
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY)
add_subdirectory(applet)
add_subdirectory(kded)
add_subdirectory(kcm)
add_subdirectory(libs)
add_subdirectory(vpn)
# Enable unit testing
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
install(FILES org.kde.vpnimport.desktop DESTINATION ${KDE_INSTALL_APPDIR})
# 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 PLASMANM
FILE plasma-nm.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)
ki18n_install(po)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)