From 2735c5bf069bcadefc2d6b626161e1166c2a683b Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 23 Oct 2019 07:48:04 +0200 Subject: 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 --- mkspecs/features/android/android_deployment_settings.prf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mkspecs') 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 += "}" -- cgit v1.2.3