summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtBuild.cmake4
-rw-r--r--src/corelib/.prev_CMakeLists.txt2
-rw-r--r--src/corelib/CMakeLists.txt2
-rw-r--r--src/gui/.prev_CMakeLists.txt6
-rw-r--r--src/gui/CMakeLists.txt6
-rwxr-xr-xutil/cmake/pro2cmake.py9
6 files changed, 19 insertions, 10 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index e36e7b379d..49ebc82b1b 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -1317,7 +1317,7 @@ function(add_qt_module target)
add_library("${target}" STATIC)
endif()
- if (android)
+ if (ANDROID)
qt_android_apply_arch_suffix("${target}")
endif()
qt_internal_add_target_aliases("${target}")
@@ -2548,7 +2548,7 @@ function(add_cmake_library target)
set(arg_ARCHIVE_INSTALL_DIRECTORY "${arg_INSTALL_DIRECTORY}")
endif()
- if (android)
+ if (ANDROID)
qt_android_apply_arch_suffix("${target}")
endif()
diff --git a/src/corelib/.prev_CMakeLists.txt b/src/corelib/.prev_CMakeLists.txt
index 74da7af125..0f9b17ff01 100644
--- a/src/corelib/.prev_CMakeLists.txt
+++ b/src/corelib/.prev_CMakeLists.txt
@@ -315,7 +315,7 @@ extend_target(Core CONDITION ANDROID
kernel/qsharedmemory_android.cpp
kernel/qsystemsemaphore_android.cpp
DEFINES
- LIBS_SUFFIX='\\"_.so\\"'
+ LIBS_SUFFIX='\\"_${ANDROID_ABI}.so\\"'
)
extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQUAL "i386")
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index c42a3e598d..e263df82d0 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -399,7 +399,7 @@ extend_target(Core CONDITION ANDROID
kernel/qsharedmemory_android.cpp
kernel/qsystemsemaphore_android.cpp
DEFINES
- LIBS_SUFFIX='\\"_.so\\"'
+ LIBS_SUFFIX="\\\\"_${ANDROID_ABI}.so\\\\"" # special case
)
extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQUAL "i386")
diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt
index 341f18bb9b..3e0f11ccf5 100644
--- a/src/gui/.prev_CMakeLists.txt
+++ b/src/gui/.prev_CMakeLists.txt
@@ -471,14 +471,14 @@ if(NOT ANDROID)
)
endif()
-extend_target(Gui CONDITION ANDROID AND arm64-v8a
+extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL arm64
SOURCES
image/qimage_neon.cpp
painting/qdrawhelper_neon.cpp painting/qdrawhelper_neon_p.h
painting/qimagescale_neon.cpp
)
-extend_target(Gui CONDITION ANDROID AND (x86 OR x86_64)
+extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL x86 OR TEST_architecture_arch STREQUAL x86_64)
SOURCES
image/qimage_ssse3.cpp
painting/qdrawhelper_sse2.cpp
@@ -545,7 +545,7 @@ if(UNIX AND NOT ANDROID AND NOT APPLE_UIKIT AND NOT INTEGRITY AND NOT (TEST_arch
)
endif()
-extend_target(Gui CONDITION ANDROID AND x86_64
+extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL x86_64
SOURCES
painting/qdrawhelper_sse4.cpp
painting/qimagescale_sse4.cpp
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index c7645e9105..9f0b07d929 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -553,14 +553,14 @@ if(NOT ANDROID)
)
endif()
-extend_target(Gui CONDITION ANDROID AND arm64-v8a
+extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL arm64
SOURCES
image/qimage_neon.cpp
painting/qdrawhelper_neon.cpp painting/qdrawhelper_neon_p.h
painting/qimagescale_neon.cpp
)
-extend_target(Gui CONDITION ANDROID AND (x86 OR x86_64)
+extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL x86 OR TEST_architecture_arch STREQUAL x86_64)
SOURCES
image/qimage_ssse3.cpp
painting/qdrawhelper_sse2.cpp
@@ -636,7 +636,7 @@ if(UNIX AND NOT ANDROID AND NOT APPLE_UIKIT AND NOT INTEGRITY AND NOT (TEST_arch
)
endif()
-extend_target(Gui CONDITION ANDROID AND x86_64
+extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL x86_64
SOURCES
painting/qdrawhelper_sse4.cpp
painting/qimagescale_sse4.cpp
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 1c3648f718..2722fda906 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -1012,6 +1012,9 @@ class Scope(object):
project_relative_path = os.path.relpath(qmake_conf_dir_path, self.currentdir)
return ["${CMAKE_CURRENT_SOURCE_DIR}/" + project_relative_path]
+ if key == "QT_ARCH":
+ return ["${ANDROID_ABI}"]
+
if key == "_PRO_FILE_PWD_":
return ["${CMAKE_CURRENT_SOURCE_DIR}"]
if key == "PWD":
@@ -1245,6 +1248,12 @@ def map_condition(condition: str) -> str:
condition = condition.replace("*-llvm", "CLANG")
condition = condition.replace("win32-*", "WIN32")
+ # new conditions added by the android multi arch qmake build
+ condition = re.sub(r'x86[^\_]', "TEST_architecture_arch STREQUAL x86", condition)
+ condition = condition.replace('x86_64', "TEST_architecture_arch STREQUAL x86_64")
+ condition = condition.replace('arm64-v8a', "TEST_architecture_arch STREQUAL arm64")
+ condition = condition.replace('armeabi-v7a', "TEST_architecture_arch STREQUAL arm")
+
pattern = r"CONFIG\((debug|release),debug\|release\)"
match_result = re.match(pattern, condition)
if match_result: