2021-12-23 16:02:41 +00:00
|
|
|
# SPDX-FileCopyrightText: 2014-2020 Marco Martin <mart@kde.org>
|
|
|
|
|
# SPDX-FileCopyrightText: 2017-2021 Bhushan Shah <bshah@kde.org>
|
|
|
|
|
# SPDX-FileCopyrightText: 2019-2021 Nicolas Fella <nicolas.fella@kde.org>
|
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
2021-03-04 12:05:03 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2020-11-11 11:36:35 +00:00
|
|
|
|
2014-09-14 15:52:19 +00:00
|
|
|
project(plasma-phone-components)
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2020-11-11 11:36:35 +00:00
|
|
|
set(QT_MIN_VERSION "5.15.0")
|
2021-10-11 19:50:50 +00:00
|
|
|
set(KF5_MIN_VERSION "5.86")
|
2021-08-24 20:41:47 +00:00
|
|
|
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2020-09-12 21:58:44 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2020-11-11 11:36:35 +00:00
|
|
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
2020-11-11 12:56:54 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
2014-08-06 08:49:28 +00:00
|
|
|
|
|
|
|
|
include(KDEInstallDirs)
|
|
|
|
|
include(KDECMakeSettings)
|
2020-01-17 16:42:10 +00:00
|
|
|
include(KDECompilerSettings NO_POLICY_SCOPE)
|
2014-08-06 08:49:28 +00:00
|
|
|
include(ECMOptionalAddSubdirectory)
|
|
|
|
|
include(ECMInstallIcons)
|
|
|
|
|
include(ECMSetupVersion)
|
|
|
|
|
include(ECMMarkNonGuiExecutable)
|
|
|
|
|
include(ECMGenerateHeaders)
|
|
|
|
|
include(GenerateExportHeader)
|
2021-05-30 15:50:22 +00:00
|
|
|
include(KDEGitCommitHooks)
|
|
|
|
|
include(KDEClangFormat)
|
2014-08-06 08:49:28 +00:00
|
|
|
include(FeatureSummary)
|
|
|
|
|
|
2021-10-02 12:01:56 +00:00
|
|
|
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
|
|
|
|
|
|
2020-11-11 11:36:35 +00:00
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
|
|
|
|
|
Core
|
|
|
|
|
Qml
|
|
|
|
|
Quick
|
|
|
|
|
)
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2020-04-22 21:08:13 +00:00
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
|
|
|
|
I18n
|
|
|
|
|
KIO
|
|
|
|
|
Plasma
|
|
|
|
|
PlasmaQuick
|
|
|
|
|
Service
|
2020-05-10 16:07:36 +00:00
|
|
|
Notifications
|
2020-11-11 11:36:35 +00:00
|
|
|
Wayland
|
2021-07-30 14:19:46 +00:00
|
|
|
ModemManagerQt
|
2020-04-22 21:08:13 +00:00
|
|
|
)
|
2021-02-24 01:05:41 +00:00
|
|
|
find_package(KWinDBusInterface)
|
2021-03-30 09:58:45 +00:00
|
|
|
set_package_properties(KWinDBusInterface PROPERTIES DESCRIPTION "KWin DBus interface"
|
|
|
|
|
TYPE REQUIRED
|
|
|
|
|
PURPOSE "Needed for virtual keyboard toggle button"
|
|
|
|
|
)
|
2014-08-06 08:49:28 +00:00
|
|
|
|
|
|
|
|
include(CheckIncludeFiles)
|
|
|
|
|
|
2015-06-18 23:31:44 +00:00
|
|
|
plasma_install_package(look-and-feel org.kde.plasma.phone look-and-feel)
|
2020-12-15 12:41:08 +00:00
|
|
|
plasma_install_package(shell org.kde.plasma.phoneshell shells)
|
2021-07-14 15:57:08 +00:00
|
|
|
plasma_install_package(quicksettings/nightcolor org.kde.plasma.nightcolor quicksettings)
|
2021-09-16 04:48:20 +00:00
|
|
|
plasma_install_package(quicksettings/airplanemode org.kde.plasma.airplanemode quicksettings)
|
2015-01-13 08:32:39 +00:00
|
|
|
|
2020-12-01 14:25:28 +00:00
|
|
|
install(FILES plasma_phone_components.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
|
2021-03-18 14:07:33 +00:00
|
|
|
|
2020-07-22 14:13:20 +00:00
|
|
|
|
2014-11-04 06:48:38 +00:00
|
|
|
add_subdirectory(bin)
|
2015-03-05 16:17:27 +00:00
|
|
|
add_subdirectory(applets)
|
2015-02-25 18:26:04 +00:00
|
|
|
add_subdirectory(containments)
|
2021-03-18 14:07:33 +00:00
|
|
|
add_subdirectory(components)
|
2021-07-30 14:19:46 +00:00
|
|
|
add_subdirectory(mmplugin)
|
2018-10-21 09:40:37 +00:00
|
|
|
|
2021-08-26 14:25:01 +00:00
|
|
|
find_program(PlasmaOpenSettings plasma-open-settings)
|
|
|
|
|
set_package_properties(PlasmaOpenSettings PROPERTIES
|
|
|
|
|
URL https://invent.kde.org/plasma/kde-cli-tools/
|
|
|
|
|
DESCRIPTION "Opens KCMs properly"
|
|
|
|
|
TYPE RUNTIME
|
|
|
|
|
PURPOSE "Used on the top panel")
|
|
|
|
|
|
2018-10-21 09:40:37 +00:00
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
2021-03-19 07:23:10 +00:00
|
|
|
|
2021-05-30 15:50:22 +00:00
|
|
|
# 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)
|