summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/android
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-10-23 07:48:04 +0200
committerAndy Shaw <andy.shaw@qt.io>2019-11-13 14:00:39 +0100
commit2735c5bf069bcadefc2d6b626161e1166c2a683b (patch)
treeee24ddd1a37c6092755b98f1b31fb48cb747381a /mkspecs/features/android
parent491005395b08660ff12a167b57a2d76e26917145 (diff)
Add support for passing qrc files to qmlimportscanner
With the qrcFiles entry in the deployment JSON for Android, it can now pass this on to qmlimportscanner for scanning the qrc files for the available imports. This enables qmake to populate the qrc files it has referenced in the project, be it generated by qmake or added by the user. Task-number: QTBUG-55259 Change-Id: Ic512ce6f24508b3ea09ebdd07ac4446debfd9155 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'mkspecs/features/android')
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf16
1 files changed, 16 insertions, 0 deletions
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index 4d6101e297..e781eb024c 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -63,6 +63,22 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
QML_ROOT_PATH = $$_PRO_FILE_PWD_
FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH),"
FILE_CONTENT += " \"stdcpp-path\": $$emitString($$ANDROID_STDCPP_PATH),"
+ !isEmpty(RESOURCES) {
+ # Make sure that qmake generated qrc files are accounted for
+ load(resources_functions)
+ qtFlattenResources()
+ for(resource, RESOURCES) {
+ contains(resource, ".*\\qmake_qmake_immediate.qrc$") {
+ # They will be created for each architecture, since they could be different
+ # we need to account for all of them
+ for (arch, ANDROID_ABIS): \
+ rescopy += $$absolute_path("qmake_qmake_immediate.qrc", $$OUT_PWD/$$arch)
+ } else {
+ contains(resource, ".*\\.qrc$"): rescopy += $$absolute_path($$resource, $$_PRO_FILE_PWD_)
+ }
+ }
+ FILE_CONTENT += " \"qrcFiles\": $$emitString($$join(rescopy, ",")),"
+ }
FILE_CONTENT += ""
FILE_CONTENT += " \"application-binary\": $$emitString($$TARGET)"
FILE_CONTENT += "}"