mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 08:57:21 +00:00
openSUSE Tumbleweed's plasma6-nm 6.6.4 does not ship the org.kde.plasma.networkmanagement.cellular QML submodule that SignalStrengthInfo.qml imports unconditionally. Without it the MobileShell QML namespace fails to load and preview boots to a black screen. Keep a minimal fallback module under tools/preview-stubs and install it only for local .prefix preview installs by default, with SHIFT_INSTALL_PREVIEW_QML_STUBS=AUTO/ON/OFF for explicit control. Add a CTest guard so qmldir entries stay backed by real files and the fallback remains tied to the QML import tree.
26 lines
No EOL
940 B
CMake
26 lines
No EOL
940 B
CMake
# SPDX-FileCopyrightText: 2026 Marco Allegretti
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
set(SHIFT_INSTALL_PREVIEW_QML_STUBS "AUTO" CACHE STRING "Install preview fallback QML stubs: AUTO, ON, or OFF")
|
|
set_property(CACHE SHIFT_INSTALL_PREVIEW_QML_STUBS PROPERTY STRINGS AUTO ON OFF)
|
|
|
|
if(NOT SHIFT_INSTALL_PREVIEW_QML_STUBS MATCHES "^(AUTO|ON|OFF)$")
|
|
message(FATAL_ERROR "SHIFT_INSTALL_PREVIEW_QML_STUBS must be AUTO, ON, or OFF")
|
|
endif()
|
|
|
|
set(_shift_install_preview_qml_stubs OFF)
|
|
if(SHIFT_INSTALL_PREVIEW_QML_STUBS STREQUAL "ON")
|
|
set(_shift_install_preview_qml_stubs ON)
|
|
elseif(SHIFT_INSTALL_PREVIEW_QML_STUBS STREQUAL "AUTO" AND CMAKE_INSTALL_PREFIX MATCHES "/\\.prefix$")
|
|
set(_shift_install_preview_qml_stubs ON)
|
|
endif()
|
|
|
|
if(_shift_install_preview_qml_stubs)
|
|
install(
|
|
DIRECTORY qml/
|
|
DESTINATION ${KDE_INSTALL_QMLDIR}
|
|
FILES_MATCHING
|
|
PATTERN "*.qml"
|
|
PATTERN "qmldir"
|
|
)
|
|
endif() |