mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 02:53:02 +08:00
[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.
This commit is contained in:
parent
385fb52332
commit
f1fbee87db
@ -16,9 +16,11 @@ if(NOT _VCPKG_IOS_TOOLCHAIN)
|
|||||||
set(_vcpkg_ios_system_processor "arm")
|
set(_vcpkg_ios_system_processor "arm")
|
||||||
set(_vcpkg_ios_target_architecture "armv7")
|
set(_vcpkg_ios_target_architecture "armv7")
|
||||||
elseif("${arch}" STREQUAL "x64")
|
elseif("${arch}" STREQUAL "x64")
|
||||||
|
set(_vcpkg_ios_system_processor "x86_64")
|
||||||
set(_vcpkg_ios_sysroot "iphonesimulator")
|
set(_vcpkg_ios_sysroot "iphonesimulator")
|
||||||
set(_vcpkg_ios_target_architecture "x86_64")
|
set(_vcpkg_ios_target_architecture "x86_64")
|
||||||
elseif("${arch}" STREQUAL "x86")
|
elseif("${arch}" STREQUAL "x86")
|
||||||
|
set(_vcpkg_ios_system_processor "i386")
|
||||||
set(_vcpkg_ios_sysroot "iphonesimulator")
|
set(_vcpkg_ios_sysroot "iphonesimulator")
|
||||||
set(_vcpkg_ios_target_architecture "i386")
|
set(_vcpkg_ios_target_architecture "i386")
|
||||||
else()
|
else()
|
||||||
|
@ -612,6 +612,10 @@ namespace vcpkg::Build
|
|||||||
{
|
{
|
||||||
return m_paths.scripts / fs::u8path("toolchains/android.cmake");
|
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")
|
else if (cmake_system_name.empty() || cmake_system_name == "Windows" || cmake_system_name == "WindowsStore")
|
||||||
{
|
{
|
||||||
return m_paths.scripts / fs::u8path("toolchains/windows.cmake");
|
return m_paths.scripts / fs::u8path("toolchains/windows.cmake");
|
||||||
|
Loading…
Reference in New Issue
Block a user