Android: Output QML import and root paths for qmlimportscanner

When deploying QML applications, the androiddeployqt tool can
use qmlimportscanner to detect the QML dependencies of the
application, but then it needs to know the root of the project
as well as additional QML import paths. We use the already-existing
QML_IMPORT_PATH for the import paths, and default to using the
location of the .pro file for the root path (same as for static
builds in qt.prf).

Change-Id: Ib536272ed1f3f1320ea8ef529655e2ba003bc734
Task-number: QTBUG-34175
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2014-07-22 10:01:01 +02:00
parent aca98e2f0e
commit a219c8b2cb

View File

@ -54,6 +54,13 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-no-sdk {
!isEmpty(ANDROID_EXTRA_LIBS): \
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"
!isEmpty(QML_IMPORT_PATH): \
FILE_CONTENT += " \"qml-import-paths\": $$emitString($$join(QML_IMPORT_PATH, ",")),"
isEmpty(QML_ROOT_PATH): \
QML_ROOT_PATH = $$_PRO_FILE_PWD_
FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH),"
FILE_CONTENT += " \"application-binary\": $$emitString($$absolute_path($$DESTDIR, $$OUT_PWD)/$$TARGET)"
FILE_CONTENT += "}"