From 61441074ef8ad63f6dc46253a6b0ea9d26506ef8 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 13 Oct 2021 14:03:53 +0200 Subject: [PATCH] Set QT_ANDROID_ABIS when builing qtbase for Android When building Qt we need to set QT_ANDROID_ABIS value to CMAKE_ANDROID_ARCH_ABI explictily since the automatical detecting of android ABI is not executed. This fixes build of the qtbase in-tree tests. Fixes: QTBUG-97133 Change-Id: Ica7057bcfcc8f4fe4b5a921ca7449f74cdbca0f1 Reviewed-by: Alexandru Croitor Reviewed-by: Assam Boudjelthia --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index bd1aeafc8f7..b8c41882377 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -627,6 +627,12 @@ macro(qt_build_tests) # prefix. For super builds it needs to be done in qt5/CMakeLists.txt. qt_set_up_fake_standalone_tests_install_prefix() endif() + else() + if(ANDROID) + # When building in-tree tests we need to specify the QT_ANDROID_ABIS list. Since we + # build Qt for the single ABI, build tests for this ABI only. + set(QT_ANDROID_ABIS "${CMAKE_ANDROID_ARCH_ABI}") + endif() endif() if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/auto/CMakeLists.txt")