mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 11:15:13 +03:00
62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
From 0a847a32663a4867f3521c838170d1b838c88e87 Mon Sep 17 00:00:00 2001
|
|
From: Chupligin Sergey <neochapay@gmail.com>
|
|
Date: Wed, 23 Jun 2021 15:07:00 +0300
|
|
Subject: [PATCH] Make developer mode and example plugins optional. Fixed #18
|
|
|
|
---
|
|
CMakeLists.txt | 3 +++
|
|
src/CMakeLists.txt | 22 +++++++++++++++++++---
|
|
2 files changed, 22 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 9e97de5..0a93da9 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -16,6 +16,9 @@ set(QT_MIN_VERSION "5.6.0")
|
|
find_package(Qt5 COMPONENTS Qml Quick Positioning LinguistTools REQUIRED)
|
|
find_package(Glacier COMPONENTS App REQUIRED)
|
|
|
|
+option(MER_DEVMODE "Install mer developer mode plugin" OFF)
|
|
+option(BUILD_EXAMPLES "Install example plugin" OFF)
|
|
+
|
|
add_subdirectory(src)
|
|
|
|
# Translations
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index d0a20dc..becd57d 100644
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -7,9 +7,7 @@ set(SRC
|
|
models/settingsmodel.cpp
|
|
models/settingsmodel.h)
|
|
set(QML_PLUGINS
|
|
- qml/plugins/example/example.json
|
|
qml/plugins/bluez/bluez.json
|
|
- qml/plugins/developermode/developermode.json
|
|
qml/plugins/display/display.json
|
|
qml/plugins/datetime/datetime.json
|
|
qml/plugins/wifi/wifi.json
|
|
@@ -38,4 +36,22 @@ install(FILES ${QML_PLUGINS}
|
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings/plugins)
|
|
install(DIRECTORY qml
|
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings
|
|
- PATTERN "*.json" EXCLUDE)
|
|
+ PATTERN "*.json" EXCLUDE
|
|
+ PATTERN "example" EXCLUDE
|
|
+ PATTERN "developermode" EXCLUDE)
|
|
+
|
|
+if(MER_DEVMODE)
|
|
+ install(FILES qml/plugins/developermode/developermode.json
|
|
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings/plugins)
|
|
+ install(DIRECTORY qml/plugins/developermode
|
|
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings/qml/plugins
|
|
+ PATTERN "*.json" EXCLUDE)
|
|
+endif()
|
|
+
|
|
+if(BUILD_EXAMPLES)
|
|
+ install(FILES qml/plugins/example/example.json
|
|
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings/plugins)
|
|
+ install(DIRECTORY qml/plugins/example
|
|
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings/qml/plugins
|
|
+ PATTERN "*.json" EXCLUDE)
|
|
+endif()
|