Skip to content

Commit

Permalink
Merge pull request #140 from TileDB-Inc/ihn/fix-wheel-macos
Browse files Browse the repository at this point in the history
Prefer CMAKE_OSX_ARCHITECTURES in FindTileDB_EP, fixes macOS arm64 wheel build
  • Loading branch information
NikolaosPapailiou authored Sep 13, 2023
2 parents 0929246 + b3c70a9 commit 70f44e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/cmake/Modules/FindTileDB_EP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,17 @@ else()
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.16.3/tiledb-windows-x86_64-2.16.3-194b5ae.zip")
SET(DOWNLOAD_SHA1 "8e986b6143ef9509201c7f2b3c0a7a53ff41095a")
elseif(APPLE) # OSX
if (DEFINED CMAKE_OSX_ARCHITECTURES)
set(ACTUAL_TARGET ${CMAKE_OSX_ARCHITECTURES})
else()
set(ACTUAL_TARGET ${CMAKE_SYSTEM_PROCESSOR})
endif()


if (CMAKE_OSX_ARCHITECTURES STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
if (ACTUAL_TARGET MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.16.3/tiledb-macos-x86_64-2.16.3-194b5ae.tar.gz")
SET(DOWNLOAD_SHA1 "b4d35306771d1c30b49bf2a98651e8e24c91037e")
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
elseif (ACTUAL_TARGET STREQUAL arm64 OR ACTUAL_TARGET MATCHES "^aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.16.3/tiledb-macos-arm64-2.16.3-194b5ae.tar.gz")
SET(DOWNLOAD_SHA1 "1f3f0e7660ed54b8988bdfcc4876021bf57d58da")
endif()
Expand Down

0 comments on commit 70f44e7

Please sign in to comment.