macOS cross compiling fixes
- can't use the x86_64 one as host triplet on arm64 because building Qt fails for whatever reason. Because of course it does :D - vcpkg doesn't always like periods in triplet names so removed those
This commit is contained in:
parent
8b50f64d68
commit
d5f588f520
|
@ -37,10 +37,10 @@ if (USE_RECOMMENDED_TRIPLETS)
|
|||
endif()
|
||||
|
||||
if (CMAKE_OSX_ARCHITECTURES STREQUAL arm64)
|
||||
set(_WANTED_TRIPLET arm64-osx-11.0-release)
|
||||
set(_WANTED_TRIPLET arm64-osx-11-release)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0)
|
||||
else()
|
||||
set(_WANTED_TRIPLET x64-osx-10.15-release)
|
||||
set(_WANTED_TRIPLET x64-osx-1015-release)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
|
@ -57,10 +57,18 @@ if (USE_RECOMMENDED_TRIPLETS)
|
|||
endif()
|
||||
|
||||
if (APPLE)
|
||||
if (_HOST_PROCESSOR STREQUAL arm64 AND _WANTED_TRIPLET MATCHES "-osx")
|
||||
set(_CAN_TARGET_AS_HOST ON)
|
||||
elseif (_WANTED_TRIPLET MATCHES "^x64-osx")
|
||||
set(_CAN_TARGET_AS_HOST ON)
|
||||
if (_HOST_PROCESSOR MATCHES arm64)
|
||||
if (_WANTED_TRIPLET MATCHES "^arm64-osx-")
|
||||
set(_CAN_TARGET_AS_HOST ON)
|
||||
elseif (_WANTED_TRIPLET STREQUAL "x64-osx-1015-release")
|
||||
# Use the default triplet for when building for arm64
|
||||
# because we're probably making a universal build
|
||||
set(VCPKG_HOST_TRIPLET arm64-osx-11-release)
|
||||
endif()
|
||||
else()
|
||||
if (_WANTED_TRIPLET MATCHES "^x64-osx-")
|
||||
set(_CAN_TARGET_AS_HOST ON)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue