diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index 3e96130b85a..a78a5a1af6d 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -300,6 +300,13 @@ function(qt6_android_generate_deployment_settings target) string(APPEND file_contents " \"zstdCompression\": ${is_zstd_enabled},\n") + if(QT_ANDROID_GENERATE_JAVA_QML_COMPONENTS) + set(is_generate_java_qml_components "true") + else() + set(is_generate_java_qml_components "false") + endif() + string(APPEND file_contents + " \"generate-java-qml-components\": ${is_generate_java_qml_components},\n") # Last item in json file # base location of stdlibc++, will be suffixed by androiddeploy qt diff --git a/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc b/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc index b710ba72756..8422a688f0d 100644 --- a/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc +++ b/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc @@ -317,6 +317,29 @@ The mentioned variables are used internally by \l{androiddeployqt}. \sa{androiddeployqt} */ +/*! +\page cmake-variable-qt-android-generate-java-qml-components.html +\ingroup cmake-variables-qtcore +\ingroup cmake-android-build-properties + +\title QT_ANDROID_GENERATE_JAVA_QML_COMPONENTS +\target cmake-variable-QT_ANDROID_GENERATE_JAVA_QML_COMPONENTS + +\summary {Enables the generation of QtQmlComponent-based classes.} +\cmakevariablesince 6.8 +\preliminarycmakevariable +\cmakevariableandroidonly + +This variable enables Java code generation for QML components of the target application. The +generated code will be included in the resulting package. The Java package name of generated +classes will be the same as the Android app package. If the leaf part of the package name is +not the same as the target executable, an extra static class with the same name as the +capitalized target executable will surround all QML modules enclosing Java classes. Each QML +module class, again in a capitalized form, will contain QtQmlComponent extension classes that +represent QML components of that module. +*/ + +\sa{androiddeployqt} /*! \page cmake-variable-qt-use-target-android-build-dir.html \ingroup cmake-variables-qtcore