From bb51031eb29dfcfa3f78bdce15de0187df43a72e Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Tue, 19 Sep 2023 20:05:07 +0300 Subject: [PATCH] Set the correct triplet on Apple Silicon. Apparently vcpkg has trouble detecting it by itself. --- cmake/Options/TileDBToolchain.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/Options/TileDBToolchain.cmake b/cmake/Options/TileDBToolchain.cmake index a3383b11dd64..0d459672b5f9 100644 --- a/cmake/Options/TileDBToolchain.cmake +++ b/cmake/Options/TileDBToolchain.cmake @@ -22,6 +22,14 @@ else() CACHE STRING "Vcpkg toolchain file") endif() +if(APPLE) + if (CMAKE_OSX_ARCHITECTURES STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)") + set(VCPKG_TARGET_TRIPLET "x64-macos") + elseif (CMAKE_OSX_ARCHITECTURES STREQUAL arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") + set(VCPKG_TARGET_TRIPLET "arm64-macos") + endif() +endif() + set(VCPKG_INSTALL_OPTIONS "--no-print-usage") macro(tiledb_vcpkg_enable_if tiledb_feature vcpkg_feature)