fix dml with preinstall ort (#2066)

This commit is contained in:
Anders Xiao
2025-03-30 12:07:19 +08:00
committed by GitHub
parent 3420c89883
commit ce196fceae
4 changed files with 95 additions and 72 deletions

View File

@@ -154,6 +154,9 @@ if(SHERPA_ONNX_USE_PRE_INSTALLED_ONNXRUNTIME_IF_AVAILABLE)
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.dylib)
elseif(WIN32)
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/onnxruntime.lib)
if(SHERPA_ONNX_ENABLE_DIRECTML)
include(onnxruntime-win-x64-directml)
endif()
else()
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.so)
endif()