forked from KDE/plasma-nm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
90 lines (69 loc) · 3.02 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
project(plasma-networkmanagement)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.4.0")
set(PROJECT_VERSION "5.8.90")
set(PROJECT_VERSION_MAJOR 5)
set(PLASMANM_VERSION_STRING ${PROJECT_VERSION} )
################# set KDE specific information #################
find_package(ECM 1.3.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMPackageConfigHelpers)
include(ECMOptionalAddSubdirectory)
include(FeatureSummary)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
DBus
Network
Quick
Widgets
)
find_package(KF5 REQUIRED
I18n WindowSystem Service Completion WidgetsAddons KIO CoreAddons Wallet ItemViews XmlGui
ConfigWidgets IconThemes Solid DBusAddons Notifications Plasma Declarative Init KDELibs4Support)
find_package(KF5NetworkManagerQt REQUIRED 5.21.0)
find_package(KF5ModemManagerQt 5.14.0)
set_package_properties(KF5ModemManagerQt PROPERTIES
TYPE OPTIONAL)
# Required only for getting information about NetworkManager version in CMake
find_package(NetworkManager 0.9.8.4)
set_package_properties(NetworkManager PROPERTIES
TYPE REQUIRED)
find_package(MobileBroadbandProviderInfo)
set_package_properties(MobileBroadbandProviderInfo PROPERTIES
DESCRIPTION "Database of mobile broadband service providers"
URL "http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders"
TYPE OPTIONAL)
find_package(Qca-qt5 2.1.0)
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Support for encryption"
URL "http://download.kde.org/stable/qca-qt5/"
TYPE REQUIRED)
if (DISABLE_MODEMMANAGER_SUPPORT)
message(STATUS "Disabling ModemManager support")
set(WITH_MODEMMANAGER_SUPPORT 0)
else()
if (KF5ModemManagerQt_FOUND)
message(STATUS "Enabling ModemManager support")
set(WITH_MODEMMANAGER_SUPPORT 1)
else()
message(STATUS "ModemManager or ModemManagerQt not found")
set(WITH_MODEMMANAGER_SUPPORT 0)
endif()
endif()
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_NO_KEYWORDS)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
add_definitions(-DWITH_MODEMMANAGER_SUPPORT=${WITH_MODEMMANAGER_SUPPORT})
include_directories(${CMAKE_CURRENT_BINARY_DIR} # for config.h
${CMAKE_CURRENT_SOURCE_DIR}/libs
${CMAKE_CURRENT_SOURCE_DIR}/libs/editor/)
add_subdirectory(applet)
add_subdirectory(editor)
add_subdirectory(kded)
add_subdirectory(libs)
add_subdirectory(vpn)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)