summaryrefslogtreecommitdiffstats
path: root/src/corelib/corelib.pro
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-10-18 16:07:45 +0200
committerCristian Adam <cristian.adam@gmail.com>2019-10-25 14:54:28 +0200
commit52c799ed4425076df4353c02950ea1444fe5f102 (patch)
tree750e70289a1b0594e89f2d996dd7fbc7752f7f3b /src/corelib/corelib.pro
parentf3dbe98dca58731ff98dff3cc9111a8252f8e1e6 (diff)
Android: Add multi-abi support for CMake
The patch adds ANDROID_BUILD_ABI_<abi> CMake options, which when enabled will determine CMake to build the current project with the enabled ABI settings. When building with CMake and the official Android CMake toolchain one needs to specify the Qt base directory as an argument to CMAKE_FIND_ROOT_PATH, which contains the Android NDK sysroot set by the toolchain. CMake will consider directories that contain this base path as valid directories to search packages. In the developer build case we have to append "lib/cmake" because the Qt base directory passed as CMAKE_FIND_ROOT_PATH will be the same directory as the developer build base, and will not be considered. Change-Id: I180502032c8ea1105bde2456252b367497f511d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/corelib/corelib.pro')
-rw-r--r--src/corelib/corelib.pro11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 452d2db0fd..6c101e21ca 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -99,6 +99,12 @@ cmake_umbrella_config_module_location_for_install.output = $$DESTDIR/cmake/insta
cmake_umbrella_config_version_file.input = $$PWD/../../mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
cmake_umbrella_config_version_file.output = $$DESTDIR/cmake/Qt5/Qt5ConfigVersion.cmake
+android {
+ cmake_android_support.input = $$PWD/Qt5AndroidSupport.cmake
+ cmake_android_support.output = $$DESTDIR/cmake/Qt5Core/Qt5AndroidSupport.cmake
+ cmake_android_support.CONFIG = verbatim
+}
+
load(cmake_functions)
defineTest(pathIsAbsolute) {
@@ -144,6 +150,11 @@ QMAKE_SUBSTITUTES += \
cmake_extras_mkspec_dir \
cmake_extras_mkspec_dir_for_install
+android {
+ QMAKE_SUBSTITUTES += cmake_android_support
+ ctest_qt5_module_files.files += $$cmake_android_support.output
+}
+
ctest_qt5_module_files.files += $$ctest_macros_file.output $$cmake_extras_mkspec_dir_for_install.output
ctest_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5Core