aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2023-10-26 11:29:09 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-11-09 17:30:11 +0000
commit2b1d6a919e0db8c30c0aa3a5c61d4a211cc02356 (patch)
treed8e83659b776664bec8de324838b70b6c42d72e2
parent4b738d7964ebbc0f6f98fa7fa9c158213a6948d9 (diff)
Examples: fix Wearable on embedded linux
Build the extra QML modules without separate backend library, so that they load correctly when deployed to embedded device. Deploy also qmldir files. Pick-to: 6.5 Change-Id: I583798eb7841c8fd0520cfa049eaecbadaf50109 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 425c65a27b1c712226697bed8709705b9914cc8a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/quickcontrols/wearable/CMakeLists.txt6
-rw-r--r--examples/quickcontrols/wearable/Wearable/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/wearable/WearableSettings/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/wearable/WearableStyle/CMakeLists.txt4
4 files changed, 15 insertions, 3 deletions
diff --git a/examples/quickcontrols/wearable/CMakeLists.txt b/examples/quickcontrols/wearable/CMakeLists.txt
index 833b1b409f..c293d64ef2 100644
--- a/examples/quickcontrols/wearable/CMakeLists.txt
+++ b/examples/quickcontrols/wearable/CMakeLists.txt
@@ -54,6 +54,6 @@ install(TARGETS wearableexample
include(../../quick/shared/QtBundleQmlModuleForMacOS.cmake)
set(app_target "wearableexample")
-add_qml_module_to_macos_app_bundle("${app_target}" "wearableplugin" "Wearable")
-add_qml_module_to_macos_app_bundle("${app_target}" "wearablesettingsplugin" "WearableSettings")
-add_qml_module_to_macos_app_bundle("${app_target}" "wearablestyleplugin" "WearableStyle")
+add_qml_module_to_macos_app_bundle("${app_target}" "wearable" "Wearable")
+add_qml_module_to_macos_app_bundle("${app_target}" "wearablesettings" "WearableSettings")
+add_qml_module_to_macos_app_bundle("${app_target}" "wearablestyle" "WearableStyle")
diff --git a/examples/quickcontrols/wearable/Wearable/CMakeLists.txt b/examples/quickcontrols/wearable/Wearable/CMakeLists.txt
index 2f319f707c..26b1a6c774 100644
--- a/examples/quickcontrols/wearable/Wearable/CMakeLists.txt
+++ b/examples/quickcontrols/wearable/Wearable/CMakeLists.txt
@@ -17,6 +17,7 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2)
qt_policy(SET QTP0001 NEW)
qt_add_qml_module(wearable
URI Wearable
+ PLUGIN_TARGET wearable
QML_FILES
AlarmsPage.qml
Clock.qml
@@ -186,3 +187,6 @@ install(TARGETS wearable
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/quickcontrols/wearable/WearableSettings/CMakeLists.txt b/examples/quickcontrols/wearable/WearableSettings/CMakeLists.txt
index ee5c7b4a38..5f259cf122 100644
--- a/examples/quickcontrols/wearable/WearableSettings/CMakeLists.txt
+++ b/examples/quickcontrols/wearable/WearableSettings/CMakeLists.txt
@@ -22,6 +22,7 @@ set_source_files_properties(WearableSettings.qml
qt_policy(SET QTP0001 NEW)
qt_add_qml_module(wearablesettings
URI WearableSettings
+ PLUGIN_TARGET wearablesettings
QML_FILES
WearableSettings.qml
)
@@ -45,3 +46,6 @@ install(TARGETS wearablesettings
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/quickcontrols/wearable/WearableStyle/CMakeLists.txt b/examples/quickcontrols/wearable/WearableStyle/CMakeLists.txt
index 3479c67c4b..e7bd69bbef 100644
--- a/examples/quickcontrols/wearable/WearableStyle/CMakeLists.txt
+++ b/examples/quickcontrols/wearable/WearableStyle/CMakeLists.txt
@@ -22,6 +22,7 @@ set_source_files_properties(UIStyle.qml
qt_policy(SET QTP0001 NEW)
qt_add_qml_module(wearablestyle
URI WearableStyle
+ PLUGIN_TARGET wearablestyle
QML_FILES
PageIndicator.qml
Slider.qml
@@ -48,3 +49,6 @@ install(TARGETS wearablestyle
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${INSTALL_EXAMPLEDIR}"
+)