Support Windows arm64 (#911)

This commit is contained in:
Fangjun Kuang
2024-05-24 11:18:14 +08:00
committed by GitHub
parent cf83412d0a
commit b09fb7f5cd
3 changed files with 157 additions and 2 deletions

View File

@@ -87,9 +87,14 @@ function(download_onnxruntime)
if(SHERPA_ONNX_ENABLE_GPU)
message(FATAL_ERROR "GPU support for Win32 is not supported!")
endif()
elseif(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64 OR CMAKE_VS_PLATFORM_NAME STREQUAL arm64)
# for 64-bit windows (arm64)
if(NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "Please pass -DBUILD_SHARED_LIBS=ON to cmake")
endif()
include(onnxruntime-win-arm64)
else()
# for 64-bit windows
# for 64-bit windows (x64)
if(BUILD_SHARED_LIBS)
message(STATUS "Use dynamic onnxruntime libraries")
if(SHERPA_ONNX_ENABLE_GPU)