Created
July 29, 2019 11:05
-
-
Save torarnv/59974af89ed73e03be512aff928f127d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/scripts/buildsystems/vcpkg.cmake w/scripts/buildsystems/vcpkg.cmake | |
index b69f44233..26ac0cf60 100644 | |
--- i/scripts/buildsystems/vcpkg.cmake | |
+++ w/scripts/buildsystems/vcpkg.cmake | |
@@ -66,27 +66,26 @@ else() | |
set(VCPKG_TOOLCHAIN ON) | |
return() | |
elseif(NOT arch_count EQUAL 1) | |
- message(WARNING "vcpkg does not support building for more than 1 architecture at a time.") | |
- set(VCPKG_TOOLCHAIN ON) | |
- return() | |
- endif() | |
- list(GET CMAKE_OSX_ARCHITECTURES 0 target_arch) | |
- if(target_arch STREQUAL arm64) | |
- set(_VCPKG_TARGET_TRIPLET_ARCH arm64) | |
- elseif(target_arch STREQUAL arm64s) | |
- set(_VCPKG_TARGET_TRIPLET_ARCH arm64s) | |
- elseif(target_arch STREQUAL armv7s) | |
- set(_VCPKG_TARGET_TRIPLET_ARCH armv7s) | |
- elseif(target_arch STREQUAL armv7) | |
- set(_VCPKG_TARGET_TRIPLET_ARCH arm) | |
- elseif(target_arch STREQUAL x86_64) | |
- set(_VCPKG_TARGET_TRIPLET_ARCH x64) | |
- elseif(target_arch STREQUAL i386) | |
- set(_VCPKG_TARGET_TRIPLET_ARCH x86) | |
+ set(_VCPKG_TARGET_TRIPLET_ARCH fat) | |
else() | |
- message(WARNING "Unable to determine target triplet arch from given arch: '${target_arch}'.") | |
- set(VCPKG_TOOLCHAIN ON) | |
- return() | |
+ list(GET CMAKE_OSX_ARCHITECTURES 0 target_arch) | |
+ if(target_arch STREQUAL arm64) | |
+ set(_VCPKG_TARGET_TRIPLET_ARCH arm64) | |
+ elseif(target_arch STREQUAL arm64s) | |
+ set(_VCPKG_TARGET_TRIPLET_ARCH arm64s) | |
+ elseif(target_arch STREQUAL armv7s) | |
+ set(_VCPKG_TARGET_TRIPLET_ARCH armv7s) | |
+ elseif(target_arch STREQUAL armv7) | |
+ set(_VCPKG_TARGET_TRIPLET_ARCH arm) | |
+ elseif(target_arch STREQUAL x86_64) | |
+ set(_VCPKG_TARGET_TRIPLET_ARCH x64) | |
+ elseif(target_arch STREQUAL i386) | |
+ set(_VCPKG_TARGET_TRIPLET_ARCH x86) | |
+ else() | |
+ message(WARNING "Unable to determine target triplet arch from given arch: '${target_arch}'.") | |
+ set(VCPKG_TOOLCHAIN ON) | |
+ return() | |
+ endif() | |
endif() | |
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") | |
diff --git i/scripts/toolchains/ios.cmake w/scripts/toolchains/ios.cmake | |
index 6f7dad7a4..eb19bf035 100644 | |
--- i/scripts/toolchains/ios.cmake | |
+++ w/scripts/toolchains/ios.cmake | |
@@ -11,6 +11,8 @@ if(NOT _VCPKG_IOS_TOOLCHAIN) | |
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING "") | |
elseif(VCPKG_TARGET_TRIPLET STREQUAL "x86-ios") | |
set(CMAKE_OSX_ARCHITECTURES i386 CACHE STRING "") | |
+ elseif(VCPKG_TARGET_TRIPLET STREQUAL "fat-ios") | |
+ set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "") | |
else() | |
message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}") | |
endif() | |
diff --git i/triplets/fat-ios.cmake w/triplets/fat-ios.cmake | |
index cfe5a9537..75521f235 100644 | |
--- i/triplets/fat-ios.cmake | |
+++ w/triplets/fat-ios.cmake | |
@@ -1,4 +1,4 @@ | |
-set(VCPKG_TARGET_ARCHITECTURE arm) | |
+set(VCPKG_TARGET_ARCHITECTURE fat) | |
set(VCPKG_CRT_LINKAGE dynamic) | |
set(VCPKG_LIBRARY_LINKAGE dynamic) | |
set(VCPKG_CMAKE_SYSTEM_NAME iOS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment