summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-10-04 17:12:39 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2022-10-31 15:39:14 +0200
commit720d5cc1a47ad0702d51548009bdcf229368d6fc (patch)
tree6e105a2950d5d4cb63cf4bd371b0f821cf758dbd /mkspecs
parent062efb305e1866482c03717ed1cf9717f45e5abb (diff)
Add flag that skips Qml import scanning to android deployment settings
If Qml module is not found it doesn't make sense to run any functionality that is related to Qml inside androiddeployqt. Add the deployment setting option that indicates this explicitly and set it to true when Qml module is not found by CMake or by qmake. Task-number: QTBUG-106939 Pick-to: 6.4 6.2 Change-Id: I1e6cffbdd230007feffe7448617097c10238a6c9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf27
1 files changed, 17 insertions, 10 deletions
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index 1819a1f52c..d56d79960c 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -64,23 +64,30 @@ contains(TEMPLATE, ".*app"):!build_pass {
tool_extension = ""
contains(QMAKE_HOST.os, Windows): tool_extension = ".exe"
- FILE_CONTENT += " \"qml-importscanner-binary\": $$emitString($$[QT_HOST_LIBEXECS]/qmlimportscanner$${tool_extension}),"
FILE_CONTENT += " \"rcc-binary\": $$emitString($$[QT_HOST_LIBEXECS]/rcc$${tool_extension}),"
- qml_import_paths = $$(QML2_IMPORT_PATH)
- qml_import_paths = $$split(qml_import_paths, $$DIRLIST_SEPARATOR)
- qml_import_paths += $$QML_IMPORT_PATH
- !isEmpty(qml_import_paths) {
- FILE_CONTENT += " \"qml-import-paths\": $$emitString($$join(qml_import_paths, ",")),"
+ contains(QT_MODULES, qml) {
+ FILE_CONTENT += " \"qml-importscanner-binary\": $$emitString($$[QT_HOST_LIBEXECS]/qmlimportscanner$${tool_extension}),"
+
+ qml_import_paths = $$(QML2_IMPORT_PATH)
+ qml_import_paths = $$split(qml_import_paths, $$DIRLIST_SEPARATOR)
+ qml_import_paths += $$QML_IMPORT_PATH
+ !isEmpty(qml_import_paths) {
+ FILE_CONTENT += " \"qml-import-paths\": $$emitString($$join(qml_import_paths, ",")),"
+ }
+ unset(qml_import_paths)
+
+
+ isEmpty(QML_ROOT_PATH): \
+ QML_ROOT_PATH = $$_PRO_FILE_PWD_
+ FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH),"
+ } else {
+ FILE_CONTENT += " \"qml-skip-import-scanning\": true,"
}
- unset(qml_import_paths)
!isEmpty(ANDROID_APPLICATION_ARGUMENTS): \
FILE_CONTENT += " \"android-application-arguments\": $$emitString($$ANDROID_APPLICATION_ARGUMENTS),"
- isEmpty(QML_ROOT_PATH): \
- 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)|!isEmpty(QMLCACHE_RESOURCE_FILES) {
# Make sure that qmake generated qrc files are accounted for