aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-10-27 12:02:54 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-11-02 09:59:56 +0200
commit7a7064e14f094e843e1ee832cc927e86f887621a (patch)
tree01b66d838548be837558f0af5cb35f1f678b879b /src/qml/doc/src
parent36e9a36b0d2fe7fd27378944218f15e1c96af925 (diff)
Stage all qml modules to a common directory when building for Android
All qml modules that are build in the user's project tree need to have a common output directory, when building for Android. This directory is used as qml import path when running androiddeployqt and provides the set of qml modules for the Android application. If user manually specifies either OUTPUT_DIRECTORY argument of the qt6_add_qml_module function or QT_QML_OUTPUT_DIRECTORY variable, it's also necessary to add this value to the QT_QML_IMPORT_PATH property of android application target that uses the module. Also few corrections in Qt6QmlMacros.cmake. Pick-to: 6.2 Task-number: QTBUG-96898 Fixes: QTBUG-97806 Change-Id: If2cd1849438aaee519b1c4c5441b31c534542923 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qml/doc/src')
-rw-r--r--src/qml/doc/src/cmake/cmake-variables.qdoc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qml/doc/src/cmake/cmake-variables.qdoc b/src/qml/doc/src/cmake/cmake-variables.qdoc
index 7abd1c6f03..8f5b87b1cb 100644
--- a/src/qml/doc/src/cmake/cmake-variables.qdoc
+++ b/src/qml/doc/src/cmake/cmake-variables.qdoc
@@ -53,6 +53,19 @@ modules under the same base location. This allows the project to use a source
directory structure that doesn't exactly match the URI structure of the QML
modules, or to merge sets of QML modules under a common base point.
+When building QML modules for Android, \c QT_QML_OUTPUT_DIRECTORY is set to
+\c{${CMAKE_BINARY_DIR}/android-qml} by default. The Android deployment routine
+uses this directory to locate the required QML modules in the build tree.
+The output directory of a QML module can also be set for a project or for each
+QML module target by the user and it can therefore differ from the Android
+default directory. In this case, to successfully deploy the executable on
+Android, the \e{target path} of the QML module must be based on the module URI.
+Also, the \l{cmake-target-property-QT_QML_IMPORT_PATH}{QT_QML_IMPORT_PATH}
+property of the executable target must contain the import paths of all QML
+modules that are built in the project tree, have a custom output directory,
+and are used by the executable target. This behavior will likely change in
+a future Qt version due to improvements in the build system implementation.
+
*/