forked from qt-creator/qt-creator
Auto-Setup: Fix VCPKG_TARGET_TRIPLET detection on Arm64 macOS
This way one could build vpkg applications by default without having linking errors. Change-Id: I8772760399a9b655ceeb389ea3c7a26e6c756e0f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -250,7 +250,16 @@ macro(qtc_auto_setup_vcpkg)
|
|||||||
set(vcpkg_triplet ${CMAKE_MATCH_1}-windows)
|
set(vcpkg_triplet ${CMAKE_MATCH_1}-windows)
|
||||||
endif()
|
endif()
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
# We're too early to use CMAKE_HOST_SYSTEM_PROCESSOR
|
||||||
|
execute_process(
|
||||||
|
COMMAND uname -m
|
||||||
|
OUTPUT_VARIABLE __apple_host_system_processor
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if (__apple_host_system_processor MATCHES "arm64")
|
||||||
|
set(vcpkg_triplet arm64-osx)
|
||||||
|
else()
|
||||||
set(vcpkg_triplet x64-osx)
|
set(vcpkg_triplet x64-osx)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(vcpkg_triplet x64-linux)
|
set(vcpkg_triplet x64-linux)
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user