Support static linking onnxruntime lib for 32-bit arm (#401)

This commit is contained in:
Fangjun Kuang
2023-10-31 11:19:01 +08:00
committed by GitHub
parent 1544a577e0
commit 2f2d3bbd82
5 changed files with 118 additions and 7 deletions

View File

@@ -8,7 +8,11 @@ function(download_onnxruntime)
if(CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
include(onnxruntime-linux-aarch64)
elseif(CMAKE_SYSTEM_NAME STREQUAL Linux AND (CMAKE_SYSTEM_PROCESSOR STREQUAL arm OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l))
include(onnxruntime-linux-arm)
if(BUILD_SHARED_LIBS)
include(onnxruntime-linux-arm)
else()
include(onnxruntime-linux-arm-static)
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
if(SHERPA_ONNX_ENABLE_GPU)
include(onnxruntime-linux-x86_64-gpu)