From d6b10f37c4dab1dcc073712ae66aa23c12777fc8 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Fri, 17 Dec 2021 13:02:04 +0100 Subject: Replace ANDROID_ABI argument with the QT_ANDROID_ABI target property This change tries to make the API more user friendly and prevent wrong use of multi-abi API. ANDROID_ABI argument of qt6_add_executable was position-depend and needed to be placed after the executable 'sources'. Using the target property we solve this problem and provide more consistent and common way to enable multi-abi build for the single target. This meanwhile also requires to execute multi-abi build configuration in the finalizer, since the property might be set at any point. Also the priority of the QT_ANDROID_ABI target property now is higher than the priority of the QT_ANDROID_BUILD_ALL_ABIS variable. So target will only build packages with the ABIs specified in QT_ANDROID_ABI property if both are set. Task-number: QTBUG-88841 Change-Id: I3515297ed267974498913c59619433dc234ec217 Reviewed-by: Joerg Bornemann (cherry picked from commit f90221d8cd2fdc8d4bf2105f0821ee30395443c7) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtAndroidHelpers.cmake | 9 +++++++++ cmake/QtExecutableHelpers.cmake | 1 + 2 files changed, 10 insertions(+) (limited to 'cmake') diff --git a/cmake/QtAndroidHelpers.cmake b/cmake/QtAndroidHelpers.cmake index 24233ac622..49c384f698 100644 --- a/cmake/QtAndroidHelpers.cmake +++ b/cmake/QtAndroidHelpers.cmake @@ -75,6 +75,15 @@ define_property(TARGET "Qt Module android feature list." ) +define_property(TARGET + PROPERTY + QT_ANDROID_ABIS + BRIEF_DOCS + "List of ABIs that the target packages are built with." + FULL_DOCS + "List of ABIs that the target packages are built with." +) + function(qt_internal_android_dependencies_content target file_content_out) get_target_property(arg_JAR_DEPENDENCIES ${target} QT_ANDROID_JAR_DEPENDENCIES) get_target_property(arg_BUNDLED_JAR_DEPENDENCIES ${target} QT_ANDROID_BUNDLED_JAR_DEPENDENCIES) diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake index 3d0933942a..a7f7678e9e 100644 --- a/cmake/QtExecutableHelpers.cmake +++ b/cmake/QtExecutableHelpers.cmake @@ -21,6 +21,7 @@ function(qt_internal_add_executable name) _qt_internal_create_executable(${name}) if (ANDROID) + _qt_internal_configure_android_multiabi_target("${name}") qt_android_generate_deployment_settings("${name}") qt_android_add_apk_target("${name}") endif() -- cgit v1.2.3