aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralcroito <alexandru.croitor@qt.io>2020-07-13 23:13:44 +0200
committerGitHub <noreply@github.com>2020-07-13 14:13:44 -0700
commitf1fbee87db75a96fbb4a3e64359ba1004209cb40 (patch)
treec89059d1163f89b1143cea5bfd2dc863bb755610
parent385fb523320da4617966e34fcd586beecfcc9014 (diff)
downloadvcpkg-f1fbee87db75a96fbb4a3e64359ba1004209cb40.tar.gz
vcpkg-f1fbee87db75a96fbb4a3e64359ba1004209cb40.zip
[vcpkg] Fix iOS toolchain detection when using the iOS community triplets (#12361)
* [vcpkg ios] Fix detection of iOS toolchain (#6003) Added mapping of CMAKE_SYSTEM_NAME == iOS to the bundled iOS toolchain file. This fixes the "Unable to determine toolchain to use for triplet arm64-ios with CMAKE_SYSTEM_NAME iOS" error. * [vcpkg ios] Set the CMake system processor for the simulator arches (#6003) So it's consistent for all architectures.
-rw-r--r--scripts/toolchains/ios.cmake2
-rw-r--r--toolsrc/src/vcpkg/build.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/scripts/toolchains/ios.cmake b/scripts/toolchains/ios.cmake
index 5497117a3..b93cdbb8a 100644
--- a/scripts/toolchains/ios.cmake
+++ b/scripts/toolchains/ios.cmake
@@ -16,9 +16,11 @@ if(NOT _VCPKG_IOS_TOOLCHAIN)
set(_vcpkg_ios_system_processor "arm")
set(_vcpkg_ios_target_architecture "armv7")
elseif("${arch}" STREQUAL "x64")
+ set(_vcpkg_ios_system_processor "x86_64")
set(_vcpkg_ios_sysroot "iphonesimulator")
set(_vcpkg_ios_target_architecture "x86_64")
elseif("${arch}" STREQUAL "x86")
+ set(_vcpkg_ios_system_processor "i386")
set(_vcpkg_ios_sysroot "iphonesimulator")
set(_vcpkg_ios_target_architecture "i386")
else()
diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp
index a0e138339..70d097873 100644
--- a/toolsrc/src/vcpkg/build.cpp
+++ b/toolsrc/src/vcpkg/build.cpp
@@ -612,6 +612,10 @@ namespace vcpkg::Build
{
return m_paths.scripts / fs::u8path("toolchains/android.cmake");
}
+ else if (cmake_system_name == "iOS")
+ {
+ return m_paths.scripts / fs::u8path("toolchains/ios.cmake");
+ }
else if (cmake_system_name.empty() || cmake_system_name == "Windows" || cmake_system_name == "WindowsStore")
{
return m_paths.scripts / fs::u8path("toolchains/windows.cmake");