summaryrefslogtreecommitdiffstats
path: root/tests/auto/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-04-08 17:23:57 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-12-03 13:35:59 +0000
commit55a15a1c1b93d36d705fc69e44b5c806b807dd55 (patch)
tree5b98c29c723bda2f298a394ee46e63f3c23ec74f /tests/auto/CMakeLists.txt
parentc800a6240353eb54bd7a2ad06c455ac9374c2476 (diff)
Add initial support for cross-building to iOS
Tested locally with the following configurations: - iOS device builds (arm64) - iOS simulator builds (x86_64) - iOS simulator_and_device builds (fat arm64 and x86_64 archives) All iOS builds currently require a custom vcpkg fork which contains fixes for building the required 3rd party libraries. qtsvg, qtdeclarative, qtgraphicaleffects and qtquickcontrols2 have also been tested to build successfully. simulator_and_device builds are also supported, but require an umerged patch in upstream CMake as well as further patches to vcpkg. Task-number: QTBUG-75576 Change-Id: Icd29913fbbd52a60e07ea5253fd9c7af7f8ce44c Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Diffstat (limited to 'tests/auto/CMakeLists.txt')
-rw-r--r--tests/auto/CMakeLists.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 0bd3b47d92..c03838bee1 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -1,8 +1,6 @@
# Generated from auto.pro.
-if (NOT APPLE_UIKIT)
- add_subdirectory(corelib)
-endif()
+add_subdirectory(corelib)
if (QT_FEATURE_dbus)
set(run_dbus_tests ON)
if(NOT CMAKE_CROSSCOMPILING AND TARGET Qt::DBus)
@@ -22,9 +20,18 @@ if (QT_FEATURE_dbus)
add_subdirectory(dbus)
endif()
endif()
-if (NOT APPLE_UIKIT AND TARGET Qt::Gui)
+if (TARGET Qt::Gui)
add_subdirectory(gui)
endif()
+
+# special case begin
+# Build only corelib and gui tests when targeting uikit (iOS),
+# because the script can't handle the SUBDIRS assignment well.
+if (APPLE_UIKIT)
+ return()
+endif()
+# special case end
+
if (TARGET Qt::Network AND NOT WINRT)
add_subdirectory(network)
endif()