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>
|
2022-03-13 20:27:14 +00:00
|
|
|
# SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
2021-12-23 16:02:41 +00:00
|
|
|
# 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
|
|
|
|
2022-01-18 16:02:38 +00:00
|
|
|
project(plasma-mobile)
|
2022-09-15 10:53:03 +00:00
|
|
|
set(PROJECT_VERSION "5.25.90")
|
2022-03-13 20:27:14 +00:00
|
|
|
set(PROJECT_VERSION_MAJOR 5)
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2022-06-27 09:04:42 +00:00
|
|
|
set(QT_MIN_VERSION "5.15.2")
|
2022-09-15 10:12:50 +00:00
|
|
|
set(KF5_MIN_VERSION "5.98.0")
|
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
|
|
|
|
2022-03-11 17:00:39 +00:00
|
|
|
set(KF_IGNORE_PLATFORM_CHECK ON CACHE BOOL "Don't check platform that is being built on")
|
2022-03-11 16:59:57 +00:00
|
|
|
|
2022-03-11 03:39:58 +00:00
|
|
|
option(QUICK_COMPILER "Use QtQuick compiler to improve performance" TRUE)
|
|
|
|
|
|
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)
|
2022-03-05 18:52:03 +00:00
|
|
|
include(ECMQMLModules)
|
|
|
|
|
include(ECMGenerateQmlTypes)
|
2022-05-19 23:34:03 +00:00
|
|
|
include(ECMFindQmlModule)
|
2014-08-06 08:49:28 +00:00
|
|
|
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)
|
|
|
|
|
|
2022-05-13 06:27:13 +00:00
|
|
|
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED
|
2020-11-11 11:36:35 +00:00
|
|
|
Core
|
|
|
|
|
Qml
|
|
|
|
|
Quick
|
|
|
|
|
)
|
2022-05-13 06:27:13 +00:00
|
|
|
if (QT_MAJOR_VERSION STREQUAL "5")
|
|
|
|
|
if (QUICK_COMPILER)
|
|
|
|
|
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED QuickCompiler)
|
|
|
|
|
endif()
|
2022-03-11 03:39:58 +00:00
|
|
|
endif()
|
|
|
|
|
|
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
|
2022-02-11 03:50:09 +00:00
|
|
|
NetworkManagerQt
|
2020-04-22 21:08:13 +00:00
|
|
|
)
|
2022-02-11 05:20:47 +00:00
|
|
|
|
|
|
|
|
find_package(LibKWorkspace CONFIG REQUIRED)
|
|
|
|
|
|
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)
|
|
|
|
|
|
2022-06-22 17:43:39 +00:00
|
|
|
ecm_find_qmlmodule(org.kde.kirigamiaddons.labs.mobileform 0.1)
|
2022-05-19 23:34:03 +00:00
|
|
|
ecm_find_qmlmodule(org.kde.pipewire 0.1)
|
|
|
|
|
|
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)
|
2015-01-13 08:32:39 +00:00
|
|
|
|
2022-04-24 11:44:41 +00:00
|
|
|
install(FILES plasma_phone_components.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
|
2021-03-18 14:07:33 +00:00
|
|
|
|
2014-11-04 06:48:38 +00:00
|
|
|
add_subdirectory(bin)
|
2015-02-25 18:26:04 +00:00
|
|
|
add_subdirectory(containments)
|
2021-03-18 14:07:33 +00:00
|
|
|
add_subdirectory(components)
|
2022-01-04 17:12:46 +00:00
|
|
|
add_subdirectory(quicksettings)
|
2022-02-13 04:23:57 +00:00
|
|
|
add_subdirectory(kcms)
|
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)
|