Support static build for windows arm64. (#1539)

This commit is contained in:
Fangjun Kuang
2024-11-15 16:06:17 +08:00
committed by GitHub
parent c34ab35591
commit b28b0c81b1
3 changed files with 77 additions and 4 deletions

View File

@@ -91,10 +91,11 @@ function(download_onnxruntime)
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")
if(BUILD_SHARED_LIBS)
include(onnxruntime-win-arm64)
else()
include(onnxruntime-win-arm64-static)
endif()
include(onnxruntime-win-arm64)
else()
# for 64-bit windows (x64)
if(SHERPA_ONNX_ENABLE_DIRECTML)