Skip to content

Commit

Permalink
Merge pull request #11 from tuxpoldo/patch-1
Browse files Browse the repository at this point in the history
Added support for MacOS (Intel and Apple Silicon)
  • Loading branch information
synesthesiam committed Sep 27, 2023
2 parents 5ae075a + e6020ff commit 4f0749a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ if(NOT DEFINED ONNXRUNTIME_DIR)
# Windows x86-64
set(ONNXRUNTIME_PREFIX "onnxruntime-win-x64-${ONNXRUNTIME_VERSION}")
set(ONNXRUNTIME_EXT "zip")
elseif (APPLE)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
# MacOS x86-64
set(ONNXRUNTIME_PREFIX "onnxruntime-osx-x86_64-${ONNXRUNTIME_VERSION}")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL arm64)
# MacOS Apple Silicon
set(ONNXRUNTIME_PREFIX "onnxruntime-osx-arm64-${ONNXRUNTIME_VERSION}")
else()
message(FATAL_ERROR "Unsupported architecture for onnxruntime")
endif()

set(ONNXRUNTIME_EXT "tgz")
else()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
# Linux x86-64
Expand Down

0 comments on commit 4f0749a

Please sign in to comment.