Add QT_ANDROID_MIN_SDK_VERSION target property

This is the counterpart to the qmake variable ANDROID_MIN_SDK_VERSION.

Task-number: QTBUG-86033
Change-Id: I4e1434a794f3a8345f9b4e045ab4366d486221af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d1eeef26256eaf6b8fbcf4a2fbe1b1dfb44f4704)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2021-04-26 12:31:17 +02:00 committed by Qt Cherry-pick Bot
parent c6a4716974
commit 5b9e896eaa
3 changed files with 26 additions and 0 deletions

View File

@ -161,6 +161,13 @@ function(qt6_android_generate_deployment_settings target)
" \"android-version-name\": \"${android_version_name}\",\n")
endif()
# minimum SDK version
get_target_property(android_min_sdk_version ${target} QT_ANDROID_MIN_SDK_VERSION)
if(android_min_sdk_version)
string(APPEND file_contents
" \"android-min-sdk-version\": \"${android_min_sdk_version}\",\n")
endif()
get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH)
if (qml_import_path)
set(_import_paths "")

View File

@ -528,6 +528,7 @@ how to accomplish this.
\li \l{cmake-target-property-QT_ANDROID_DEPLOYMENT_DEPENDENCIES}{QT_ANDROID_DEPLOYMENT_DEPENDENCIES}
\li \l{cmake-target-property-QT_ANDROID_EXTRA_LIBS}{QT_ANDROID_EXTRA_LIBS}
\li \l{cmake-target-property-QT_ANDROID_EXTRA_PLUGINS}{QT_ANDROID_EXTRA_PLUGINS}
\li \l{cmake-target-property-QT_ANDROID_MIN_SDK_VERSION}{QT_ANDROID_MIN_SDK_VERSION}
\li \l{cmake-target-property-QT_ANDROID_PACKAGE_SOURCE_DIR}{QT_ANDROID_PACKAGE_SOURCE_DIR}
\li \l{cmake-target-property-QT_ANDROID_VERSION_NAME}{QT_ANDROID_VERSION_NAME}
\li \l{cmake-target-property-QT_ANDROID_VERSION_CODE}{QT_ANDROID_VERSION_CODE}

View File

@ -111,6 +111,24 @@ that.
\sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()}
*/
/*!
\page cmake-target-property-QT_ANDROID_MIN_SDK_VERSION.html
\ingroup cmake-properties-qtcore
\ingroup cmake-target-properties-qtcore
\title QT_ANDROID_MIN_SDK_VERSION
\target cmake-target-property-QT_ANDROID_MIN_SDK_VERSION
\brief Minimum Android SDK version.
\preliminarycmakeproperty
\cmakepropertyandroidonly
Specifies the minimum Android API level for the target.
\sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()}
*/
/*!
\page cmake-target-property-QT_ANDROID_PACKAGE_SOURCE_DIR.html
\ingroup cmake-properties-qtcore