summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/android/android_deployment_settings.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/android/android_deployment_settings.prf')
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf48
1 files changed, 34 insertions, 14 deletions
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index c351aa5e69..8d68defa97 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -1,4 +1,4 @@
-contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
+contains(TEMPLATE, ".*app"):!build_pass {
defineReplace(emitString) {
return("\"$$clean_path($$1)\"")
@@ -8,6 +8,11 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
FILE_CONTENT += " \"description\": \"This file is generated by qmake to be read by androiddeployqt and should not be modified by hand.\","
FILE_CONTENT += " \"qt\": $$emitString($$[QT_INSTALL_PREFIX]),"
+ FILE_CONTENT += " \"qtDataDirectory\": $$emitString($$relative_path($$[QT_INSTALL_DATA], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtLibExecsDirectory\": $$emitString($$relative_path($$[QT_INSTALL_LIBEXECS], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtLibsDirectory\": $$emitString($$relative_path($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtPluginsDirectory\": $$emitString($$relative_path($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtQmlDirectory\": $$emitString($$relative_path($$[QT_INSTALL_QML], $$[QT_INSTALL_PREFIX])),"
# Settings from mkspecs/environment
FILE_CONTENT += " \"sdk\": $$emitString($$ANDROID_SDK_ROOT),"
@@ -62,23 +67,32 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
!isEmpty(ANDROID_EXTRA_LIBS): \
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"
- FILE_CONTENT += " \"qml-importscanner-binary\": $$emitString($$[QT_HOST_BINS]/qmlimportscanner),"
- FILE_CONTENT += " \"rcc-binary\": $$emitString($$[QT_HOST_BINS]/rcc),"
+ tool_extension = ""
+ contains(QMAKE_HOST.os, Windows): tool_extension = ".exe"
+ 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
@@ -89,8 +103,14 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
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)
+ qmake_qrc_path = "qmake_qmake_immediate.qrc"
+ base_out_path = $$OUT_PWD/$$RCC_DIR
+ multi_android_abi {
+ for (arch, ANDROID_ABIS): \
+ rescopy += $$absolute_path($$qmake_qrc_path, $$base_out_path/$$arch)
+ } else {
+ rescopy += $$absolute_path($$qmake_qrc_path, $$base_out_path)
+ }
} else {
contains(resource, ".*\\.qrc$"): rescopy += $$absolute_path($$resource, $$_PRO_FILE_PWD_)
}