Support static linking onnxruntime for 64-bit ARM (#402)

This commit is contained in:
Fangjun Kuang
2023-10-31 16:51:04 +08:00
committed by GitHub
parent 2f2d3bbd82
commit fabbc70633
9 changed files with 291 additions and 19 deletions

View File

@@ -6,7 +6,11 @@ function(download_onnxruntime)
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
if(CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
include(onnxruntime-linux-aarch64)
if(BUILD_SHARED_LIBS)
include(onnxruntime-linux-aarch64)
else()
include(onnxruntime-linux-aarch64-static)
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL Linux AND (CMAKE_SYSTEM_PROCESSOR STREQUAL arm OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l))
if(BUILD_SHARED_LIBS)
include(onnxruntime-linux-arm)