Android: fix problem with release package for cmake based builds

After 9efaf8bae914958a09d29a4cdbf62e345f3e6369 commit there is no
possibility to create release package for cmake based builds.

Added a new cmake variable (QT_ANDROID_DEPLOY_RELEASE) to allow turning
on release build manually.

Task-number: QTBUG-112921
Task-number: QTBUG-108132
Task-number: COIN-882
Pick-to: 6.5
Change-Id: Idf015b4ad3f8cba792aab75a01e1c81225cad4f0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Bartlomiej Moskal 2023-04-19 09:32:20 +02:00
parent 3c3de181ef
commit 64db65ae90
2 changed files with 22 additions and 0 deletions

View File

@ -428,6 +428,9 @@ function(qt6_android_add_apk_target target)
if(QT_ENABLE_VERBOSE_DEPLOYMENT)
list(APPEND extra_args "--verbose")
endif()
if(QT_ANDROID_DEPLOY_RELEASE)
list(APPEND extra_args "--release")
endif()
_qt_internal_check_depfile_support(has_depfile_support)

View File

@ -79,6 +79,25 @@ out as part of the deployment settings for a target.
\sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()}
*/
/*!
\page cmake-variable-qt-android-deploy-release.html
\ingroup cmake-variables-qtcore
\title QT_ANDROID_DEPLOY_RELEASE
\target cmake-variable-QT_ANDROID_DEPLOY_RELEASE
\summary {Set the package type as a release}
\cmakevariablesince 6.5.1
\preliminarycmakevariable
\cmakevariableandroidonly
Setting \c{QT_ANDROID_DEPLOY_RELEASE} to true allows to create release package by passing --release
flag to androiddeployqt tool.
\sa {androiddeployqt}
*/
/*!
\page cmake_variable-qt-android-multi-abi-forward-vars
\ingroup cmake-variables-qtcore