diff options
author | Iikka Eklund <iikka.eklund@qt.io> | 2020-12-01 20:24:44 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-02 08:21:55 +0000 |
commit | 362271cc8ecd9fb003b63337bb06f221b29187b6 (patch) | |
tree | c43acb61476ed49e41a46238fb684302d181b72e | |
parent | ca3f35aefd150643293c13b3e2456b80771e116f (diff) |
Conan: Fix iOS builds
Conan passes some autodetected iOS related CMake options like
CMAKE_SYSTEM_NAME, CMAKE_OSX_ARCHITECTURES, CMAKE_OSX_SYSROOT,
which apparently don't work out of the box.
- Explicitly pass 'iOS' for CMAKE_SYSTEM_NAME
- Remove the explicit sysroot 'CMAKE_OSX_SYSROOT', let CMake detect
the sysroots, to ensure that multi-arch builds work.
- Remove the conan provided architecture 'CMAKE_OSX_ARCHITECTURES',
instead rely on the architectures set by the Qt toolchain file,
which with official Qt packages most likely means multi-arch iOS.
Task-number: QTBUG-89020
Change-Id: I3c559f00f9391edf68bf88348baae561dc5f0991
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
(cherry picked from commit 2ed189225580f49695560b59f4fe341da4444253)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | conanfile.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/conanfile.py b/conanfile.py index 42558025f..02927ec60 100644 --- a/conanfile.py +++ b/conanfile.py @@ -95,6 +95,19 @@ class Qt3D(ConanFile): cmake.definitions["ANDROID_SDK_ROOT"] = self._read_env('ANDROID_SDK_ROOT') cmake.definitions["ANDROID_NDK_ROOT"] = self._read_env('ANDROID_NDK_ROOT') + if self.settings.os == "iOS": + # Instead of Conan's auto-added 'Darwin', explicitly pass 'iOS'. + cmake.definitions["CMAKE_SYSTEM_NAME"] = "iOS" + + # Remove the explicit sysroot, let CMake detect the sysroots, to ensure + # that multi-arch builds work. + del cmake.definitions["CMAKE_OSX_SYSROOT"] + + # Remove the conan provided architecture, instead rely on the architectures set + # by the Qt toolchain file, which with official Qt packages most likely means + # multi-arch iOS. + del cmake.definitions["CMAKE_OSX_ARCHITECTURES"] + for c in [ 'assimp', 'opengl_renderer', 'rhi_renderer']: value = os.environ.get('qt3d_' + c) if value: |