CMake: Add QT_ANDROID_SIGN_AAB variable

[ChangeLog][CMake] Added the QT_ANDROID_SIGN_AAB variable that can be
set to ON to enable signing of .aab packages.

Fixes: QTBUG-105529
Change-Id: Ic06cc452851dc81b10a2721b544641cb5eeea8be
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 042290d0fb8ea99b2e6c6a5f17359ffc58222ded)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2022-08-11 10:14:42 +02:00 committed by Qt Cherry-pick Bot
parent 2b5b8395e1
commit d052236a2f
2 changed files with 31 additions and 0 deletions

View File

@ -388,9 +388,14 @@ function(qt6_android_add_apk_target target)
COMMENT "Copying ${target} binary to apk folder"
)
set(sign_apk "")
if(QT_ANDROID_SIGN_APK)
set(sign_apk "--sign")
endif()
set(sign_aab "")
if(QT_ANDROID_SIGN_AAB)
set(sign_aab "--sign")
endif()
set(extra_args "")
if(QT_INTERNAL_NO_ANDROID_RCC_BUNDLE_CLEANUP)
@ -460,6 +465,7 @@ function(qt6_android_add_apk_target target)
--output ${apk_final_dir}
--apk ${apk_final_file_path}
--aab
${sign_aab}
${extra_args}
COMMENT "Creating AAB for ${target}"
)

View File

@ -155,6 +155,31 @@ Each variable can be used to specify the path to Qt for Android for the correspo
\sa{cmake-variable-QT_ANDROID_ABIS}{QT_ANDROID_ABIS}
*/
/*!
\page cmake-variable-QT_ANDROID_SIGN_AAB.html
\ingroup cmake-variables-qtcore
\title QT_ANDROID_SIGN_AAB
\target cmake-variable-QT_ANDROID_SIGN_AAB
\summary {Sign the .aab package with the specified keystore, alias and store password.}
\cmakevariablesince 6.4
\preliminarycmakevariable
\cmakevariableandroidonly
Sign the resulting package. The path of the keystore file, the alias of the key and passwords
have to be specified by additional environment variables:
\badcode
QT_ANDROID_KEYSTORE_PATH
QT_ANDROID_KEYSTORE_ALIAS
QT_ANDROID_KEYSTORE_STORE_PASS
QT_ANDROID_KEYSTORE_KEY_PASS
\endcode
Mentioned variables are used internally by \l{androiddeployqt}.
\sa{androiddeployqt}
*/
/*!
\page cmake-variable-QT_ANDROID_SIGN_APK.html
\ingroup cmake-variables-qtcore