summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-11-07 15:03:33 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2019-11-08 09:40:24 +0000
commit512aae3abea65dcdc1e3d667eab73b8f41cf5601 (patch)
tree4fa04cc8aba5ea30a439ebb6c6a1a989a2f24593
parent6b193c88a7071b8ab9c81d2408b633a62226cf63 (diff)
Fix Android x86 builds
Replace condition x86 to i386 to match other platforms. Regenerate src/gui/CMakeLists.txt Disable SSE4 on android x86 to match qmake. Change-Id: Ic0d330206f2d70a79d72553aa3ff0f91ff58119c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtBaseConfigureTests.cmake9
-rw-r--r--src/gui/.prev_CMakeLists.txt2
-rw-r--r--src/gui/CMakeLists.txt2
-rwxr-xr-xutil/cmake/pro2cmake.py2
4 files changed, 12 insertions, 3 deletions
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
index 34e4e6e6f1..2b26926bcb 100644
--- a/cmake/QtBaseConfigureTests.cmake
+++ b/cmake/QtBaseConfigureTests.cmake
@@ -162,4 +162,13 @@ function(run_config_tests)
run_linker_version_script_support()
endfunction()
+# The qmake build of android does not perform the right architecture tests and
+# forcefully disables sse4 on android x86. We have to mimic this behavior
+# for now
+if (CMAKE_ANDROID_ARCH_ABI STREQUAL x86)
+ set(QT_FEATURE_sse4_1 OFF CACHE BOOL INTERNAL FORCE)
+ set(QT_FEATURE_sse4_2 OFF CACHE BOOL INTERNAL FORCE)
+ set(TEST_subarch_sse4_1 FALSE CACHE BOOL INTERNAL FORCE)
+ set(TEST_subarch_sse4_2 FALSE CACHE BOOL INTERNAL FORCE)
+endif()
run_config_tests()
diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt
index 3e0f11ccf5..1a21358fc7 100644
--- a/src/gui/.prev_CMakeLists.txt
+++ b/src/gui/.prev_CMakeLists.txt
@@ -478,7 +478,7 @@ extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL arm64
painting/qimagescale_neon.cpp
)
-extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL x86 OR TEST_architecture_arch STREQUAL x86_64)
+extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL i386 OR TEST_architecture_arch STREQUAL x86_64)
SOURCES
image/qimage_ssse3.cpp
painting/qdrawhelper_sse2.cpp
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 9f0b07d929..6a62fa233c 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -560,7 +560,7 @@ extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL arm64
painting/qimagescale_neon.cpp
)
-extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL x86 OR TEST_architecture_arch STREQUAL x86_64)
+extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL i386 OR TEST_architecture_arch STREQUAL x86_64)
SOURCES
image/qimage_ssse3.cpp
painting/qdrawhelper_sse2.cpp
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 89e3e6441a..07f1fe26df 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -1281,7 +1281,7 @@ def map_condition(condition: str) -> str:
condition = condition.replace("|", " OR ")
# new conditions added by the android multi arch qmake build
- condition = re.sub(r"(^| )x86([^\_]|$)", "TEST_architecture_arch STREQUAL x86", condition)
+ condition = re.sub(r"(^| )x86([^\_]|$)", "TEST_architecture_arch STREQUAL i386", condition)
condition = re.sub(r"(^| )x86_64", " TEST_architecture_arch STREQUAL x86_64", condition)
condition = re.sub(r"(^| )arm64-v8a", "TEST_architecture_arch STREQUAL arm64", condition)
condition = re.sub(r"(^| )armeabi-v7a", "TEST_architecture_arch STREQUAL arm", condition)