summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-12-17 13:02:04 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2022-01-03 14:35:13 +0100
commitf90221d8cd2fdc8d4bf2105f0821ee30395443c7 (patch)
treecd1de31e6e6e55090533db097ed6eb23a81e4229 /cmake
parent612417ea701b5276abd392af383fff3133b95a47 (diff)
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. Pick-to: 6.3 Task-number: QTBUG-88841 Change-Id: I3515297ed267974498913c59619433dc234ec217 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtAndroidHelpers.cmake9
-rw-r--r--cmake/QtExecutableHelpers.cmake1
2 files changed, 10 insertions, 0 deletions
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()