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
|
|
|
|
|
|
2025-03-01 21:26:47 +00:00
|
|
|
cmake_minimum_required(VERSION 3.24)
|
2020-11-11 11:36:35 +00:00
|
|
|
|
2022-01-18 16:02:38 +00:00
|
|
|
project(plasma-mobile)
|
2026-01-13 10:18:57 +00:00
|
|
|
set(PROJECT_VERSION "6.5.90")
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2025-09-18 12:19:48 +00:00
|
|
|
set(PROJECT_DEP_VERSION "6.4.90")
|
2026-01-13 09:17:07 +00:00
|
|
|
set(QT_MIN_VERSION "6.10.0")
|
2026-01-13 09:17:07 +00:00
|
|
|
set(KF6_MIN_VERSION "6.22.0")
|
2021-08-24 20:41:47 +00:00
|
|
|
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2023-03-06 06:38:43 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2020-09-12 21:58:44 +00:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2014-08-06 08:49:28 +00:00
|
|
|
|
2024-08-18 10:55:29 +00:00
|
|
|
option(INSTALL_SYSTEMD_SERVICE "Install a systemd service file to start the session" OFF)
|
|
|
|
|
|
2023-03-02 07:19:14 +00:00
|
|
|
find_package(ECM ${KF6_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
|
|
|
|
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)
|
2023-08-15 17:25:22 +00:00
|
|
|
include(ECMFindQmlModule)
|
2022-03-05 18:52:03 +00:00
|
|
|
include(ECMGenerateQmlTypes)
|
2025-07-02 14:27:33 +00:00
|
|
|
include(ECMConfiguredInstall)
|
2022-05-19 23:34:03 +00:00
|
|
|
include(ECMFindQmlModule)
|
2025-07-10 16:00:41 +00:00
|
|
|
include(ECMQtDeclareLoggingCategory)
|
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)
|
|
|
|
|
|
2023-02-23 16:43:38 +00:00
|
|
|
ecm_setup_version(${PROJECT_VERSION}
|
|
|
|
|
VARIABLE_PREFIX PLASMA_MOBILE
|
|
|
|
|
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
|
|
|
|
)
|
|
|
|
|
|
2023-06-02 16:28:18 +00:00
|
|
|
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED
|
2020-11-11 11:36:35 +00:00
|
|
|
Core
|
|
|
|
|
Qml
|
|
|
|
|
Quick
|
2023-03-28 06:41:50 +00:00
|
|
|
Gui
|
2023-11-05 23:09:33 +00:00
|
|
|
Sensors
|
2024-11-07 16:13:06 +00:00
|
|
|
WaylandClient
|
2020-11-11 11:36:35 +00:00
|
|
|
)
|
2022-03-11 03:39:58 +00:00
|
|
|
|
2025-04-18 15:38:37 +00:00
|
|
|
if(Qt6WaylandClient_VERSION VERSION_GREATER_EQUAL "6.10.0")
|
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS WaylandClientPrivate)
|
|
|
|
|
endif()
|
|
|
|
|
|
2023-03-02 07:19:14 +00:00
|
|
|
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
|
2020-04-22 21:08:13 +00:00
|
|
|
I18n
|
2023-03-06 06:38:43 +00:00
|
|
|
GlobalAccel
|
2020-04-22 21:08:13 +00:00
|
|
|
KIO
|
2023-03-02 07:19:14 +00:00
|
|
|
Config
|
2023-02-23 16:43:38 +00:00
|
|
|
DBusAddons
|
2023-08-29 14:30:12 +00:00
|
|
|
ItemModels
|
2020-04-22 21:08:13 +00:00
|
|
|
Service
|
2020-05-10 16:07:36 +00:00
|
|
|
Notifications
|
2021-07-30 14:19:46 +00:00
|
|
|
ModemManagerQt
|
2022-02-11 03:50:09 +00:00
|
|
|
NetworkManagerQt
|
2022-10-02 15:56:55 +00:00
|
|
|
KCMUtils
|
2023-03-05 06:26:28 +00:00
|
|
|
Package
|
2023-08-19 16:50:32 +00:00
|
|
|
JobWidgets
|
2025-11-30 10:25:40 +00:00
|
|
|
WindowSystem
|
2020-04-22 21:08:13 +00:00
|
|
|
)
|
2022-02-11 05:20:47 +00:00
|
|
|
|
2023-11-23 22:42:47 +00:00
|
|
|
find_package(Plasma CONFIG REQUIRED)
|
|
|
|
|
find_package(PlasmaQuick CONFIG REQUIRED)
|
2024-07-01 22:56:56 +00:00
|
|
|
find_package(PlasmaActivities CONFIG REQUIRED)
|
2023-11-05 23:09:33 +00:00
|
|
|
find_package(KF6Screen CONFIG REQUIRED)
|
2023-11-23 14:26:22 +00:00
|
|
|
find_package(KWayland CONFIG REQUIRED)
|
2025-06-14 01:16:20 +00:00
|
|
|
find_package(KPipeWire ${PROJECT_DEP_VERSION} REQUIRED)
|
2023-11-05 23:09:33 +00:00
|
|
|
|
2023-03-14 01:45:47 +00:00
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
|
|
2025-07-28 17:20:33 +00:00
|
|
|
find_package(QCoro6 REQUIRED COMPONENTS DBus Qml)
|
2023-12-15 05:15:39 +00:00
|
|
|
qcoro_enable_coroutines()
|
2023-12-29 12:19:44 +00:00
|
|
|
kde_enable_exceptions()
|
2023-12-15 05:15:39 +00:00
|
|
|
|
2023-03-14 01:45:47 +00:00
|
|
|
find_package(KF6KirigamiAddons 0.6 REQUIRED)
|
2023-03-06 06:38:43 +00:00
|
|
|
find_package(epoxy REQUIRED)
|
|
|
|
|
find_package(XCB REQUIRED COMPONENTS XCB)
|
2024-01-23 14:14:17 +00:00
|
|
|
find_package(KWin ${PROJECT_DEP_VERSION} REQUIRED COMPONENTS
|
2023-10-24 21:54:22 +00:00
|
|
|
kwin
|
2023-03-06 06:38:43 +00:00
|
|
|
)
|
|
|
|
|
|
2024-10-25 15:52:49 +00:00
|
|
|
find_package(LayerShellQt REQUIRED)
|
2025-07-02 14:27:33 +00:00
|
|
|
find_package(Wayland REQUIRED)
|
|
|
|
|
find_package(PlasmaWaylandProtocols 1.8 CONFIG)
|
|
|
|
|
set_package_properties(PlasmaWaylandProtocols PROPERTIES
|
|
|
|
|
TYPE REQUIRED
|
|
|
|
|
PURPOSE "Collection of Plasma-specific Wayland protocols"
|
|
|
|
|
URL "https://invent.kde.org/libraries/plasma-wayland-protocols/"
|
|
|
|
|
)
|
|
|
|
|
|
2024-10-25 15:52:49 +00:00
|
|
|
|
2022-02-11 05:20:47 +00:00
|
|
|
find_package(LibKWorkspace CONFIG REQUIRED)
|
2024-01-01 13:51:58 +00:00
|
|
|
find_package(Libudev REQUIRED)
|
2022-02-11 05:20:47 +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
|
|
|
|
2025-07-10 16:00:41 +00:00
|
|
|
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS Auth)
|
|
|
|
|
set_package_properties(KF6::AuthCore PROPERTIES
|
|
|
|
|
TYPE REQUIRED
|
|
|
|
|
PURPOSE "Allows Plasma Mobile to configure Waydroid"
|
|
|
|
|
)
|
|
|
|
|
|
2014-08-06 08:49:28 +00:00
|
|
|
include(CheckIncludeFiles)
|
|
|
|
|
|
2022-05-19 23:34:03 +00:00
|
|
|
ecm_find_qmlmodule(org.kde.pipewire 0.1)
|
|
|
|
|
|
2023-04-03 02:58:09 +00:00
|
|
|
plasma_install_package(lookandfeel org.kde.breeze.mobile look-and-feel lookandfeel)
|
2023-11-23 08:05:44 +00:00
|
|
|
plasma_install_package(shell org.kde.plasma.mobileshell shells)
|
2015-01-13 08:32:39 +00:00
|
|
|
|
2014-11-04 06:48:38 +00:00
|
|
|
add_subdirectory(bin)
|
2021-03-18 14:07:33 +00:00
|
|
|
add_subdirectory(components)
|
2023-12-28 00:27:30 +00:00
|
|
|
add_subdirectory(containments)
|
panels: Add support for defining device specific panel tweaks
This adds support for specifying options needed to deal with phone
display panel pecularities (ex. screen curves, notches, punch holes)
This is implemented as settings in ~/.config/plasmamobilerc, which can
set panel heights, paddings, and center spacings to duck display
cutouts. The pixel values are scaling independent, and so are not
affected when the display scaling is changed.
This is then exposed over DBus, so that components from outside of
plasmashell (ex. KWin) can access it easily without needing to connect to
kscreen themselves. Each screen is exposed as a single object.
Currently support is only added in the status bar and the navigation
panel.
Currently all screens have the settings applied. In the future, we may
want to limit this just to the internal screen (?)
---
This also adds a "devices" folder (in `devices/configs`) where per-device configs can be set.
This is installed to `/usr/share/plasma-mobile-device-configs`.
In `plasmamobilerc` (installed to `/etc/xdg/plasmamobilerc`, or
`~/.config/plasmamobilerc`), envmanager will read:
```toml
[Device]
device=oneplus-enchilada
```
for the device config to use and write its settings to
`~/.config/plasma-mobile/plasmamobilerc`.
2025-10-05 23:06:52 +00:00
|
|
|
add_subdirectory(devices)
|
2022-01-04 17:12:46 +00:00
|
|
|
add_subdirectory(quicksettings)
|
2022-02-13 04:23:57 +00:00
|
|
|
add_subdirectory(kcms)
|
2023-02-23 16:43:38 +00:00
|
|
|
add_subdirectory(kded)
|
2023-02-11 18:04:11 +00:00
|
|
|
add_subdirectory(kwin)
|
2023-03-30 02:40:47 +00:00
|
|
|
add_subdirectory(envmanager)
|
2023-04-01 07:09:57 +00:00
|
|
|
add_subdirectory(initialstart)
|
2024-06-26 00:57:56 +00:00
|
|
|
add_subdirectory(layout-templates)
|
2024-07-25 03:11:26 +00:00
|
|
|
if(BUILD_TESTING)
|
|
|
|
|
add_subdirectory(tests)
|
|
|
|
|
endif()
|
panels: Add support for defining device specific panel tweaks
This adds support for specifying options needed to deal with phone
display panel pecularities (ex. screen curves, notches, punch holes)
This is implemented as settings in ~/.config/plasmamobilerc, which can
set panel heights, paddings, and center spacings to duck display
cutouts. The pixel values are scaling independent, and so are not
affected when the display scaling is changed.
This is then exposed over DBus, so that components from outside of
plasmashell (ex. KWin) can access it easily without needing to connect to
kscreen themselves. Each screen is exposed as a single object.
Currently support is only added in the status bar and the navigation
panel.
Currently all screens have the settings applied. In the future, we may
want to limit this just to the internal screen (?)
---
This also adds a "devices" folder (in `devices/configs`) where per-device configs can be set.
This is installed to `/usr/share/plasma-mobile-device-configs`.
In `plasmamobilerc` (installed to `/etc/xdg/plasmamobilerc`, or
`~/.config/plasmamobilerc`), envmanager will read:
```toml
[Device]
device=oneplus-enchilada
```
for the device config to use and write its settings to
`~/.config/plasma-mobile/plasmamobilerc`.
2025-10-05 23:06:52 +00:00
|
|
|
|
2025-09-21 12:51:43 +00:00
|
|
|
install(FILES org.kde.plasma.mobileshell.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
|
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)
|
2022-10-02 15:14:17 +00:00
|
|
|
|
|
|
|
|
ki18n_install(po)
|
2024-08-18 10:55:29 +00:00
|
|
|
|
|
|
|
|
if (INSTALL_SYSTEMD_SERVICE)
|
|
|
|
|
install(FILES
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/plasma-mobile.service
|
2025-11-25 11:05:27 +00:00
|
|
|
DESTINATION ${KDE_INSTALL_SYSTEMDUNITDIR}/system
|
2024-08-18 10:55:29 +00:00
|
|
|
)
|
|
|
|
|
endif()
|