diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index ada8495a98..ab793d3499 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -168,6 +168,13 @@ function(qt6_android_generate_deployment_settings target) " \"android-min-sdk-version\": \"${android_min_sdk_version}\",\n") endif() + # target SDK version + get_target_property(android_target_sdk_version ${target} QT_ANDROID_TARGET_SDK_VERSION) + if(android_target_sdk_version) + string(APPEND file_contents + " \"android-target-sdk-version\": \"${android_target_sdk_version}\",\n") + endif() + get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH) if (qml_import_path) set(_import_paths "") diff --git a/src/corelib/doc/src/cmake-macros.qdoc b/src/corelib/doc/src/cmake-macros.qdoc index ffbf673a32..29c1785b67 100644 --- a/src/corelib/doc/src/cmake-macros.qdoc +++ b/src/corelib/doc/src/cmake-macros.qdoc @@ -530,6 +530,7 @@ how to accomplish this. \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_TARGET_SDK_VERSION}{QT_ANDROID_TARGET_SDK_VERSION} \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} \li \l{cmake-target-property-QT_QML_IMPORT_PATH}{QT_QML_IMPORT_PATH} diff --git a/src/corelib/doc/src/cmake-properties.qdoc b/src/corelib/doc/src/cmake-properties.qdoc index 8d2dce5b15..ced2798f62 100644 --- a/src/corelib/doc/src/cmake-properties.qdoc +++ b/src/corelib/doc/src/cmake-properties.qdoc @@ -161,6 +161,24 @@ then place this directly into the directory specified by this variable. \sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()} */ +/*! +\page cmake-target-property-QT_ANDROID_TARGET_SDK_VERSION.html +\ingroup cmake-properties-qtcore +\ingroup cmake-target-properties-qtcore + +\title QT_ANDROID_TARGET_SDK_VERSION +\target cmake-target-property-QT_ANDROID_TARGET_SDK_VERSION + +\brief Android target SDK version. + +\preliminarycmakeproperty +\cmakepropertyandroidonly + +Specifies the target Android API level for the target. + +\sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()} +*/ + /*! \page cmake-target-property-QT_ANDROID_VERSION_CODE.html \ingroup cmake-properties-qtcore