Skip to content

Commit

Permalink
Set the correct triplet on Apple Silicon.
Browse files Browse the repository at this point in the history
Apparently vcpkg has trouble detecting it by itself.
  • Loading branch information
teo-tsirpanis committed Sep 19, 2023
1 parent 94dccd8 commit bb51031
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/Options/TileDBToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bb51031

Please sign in to comment.