From 751ed97e5442bd42a4f6e262a6104564204b8646 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Sat, 14 Sep 2024 16:45:49 -0400 Subject: [PATCH] refactor: Update Onnxruntime library paths for aarch64 and other architectures --- cmake/FetchOnnxruntime.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/FetchOnnxruntime.cmake b/cmake/FetchOnnxruntime.cmake index 940bada..4d83a63 100644 --- a/cmake/FetchOnnxruntime.cmake +++ b/cmake/FetchOnnxruntime.cmake @@ -84,11 +84,13 @@ elseif(MSVC) else() if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") set(Onnxruntime_LINK_LIBS "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.${Onnxruntime_VERSION}") - set(Onnxruntime_INSTALL_LIBS ${Onnxruntime_LINK_LIBS}) + set(Onnxruntime_INSTALL_LIBS ${Onnxruntime_LINK_LIBS} "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.1" + "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so") else() set(Onnxruntime_LINK_LIBS "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.${Onnxruntime_VERSION}") - set(Onnxruntime_INSTALL_LIBS ${Onnxruntime_LINK_LIBS} - "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime_providers_shared.so") + set(Onnxruntime_INSTALL_LIBS + ${Onnxruntime_LINK_LIBS} "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime_providers_shared.so" + "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.1" "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so") endif() target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${Onnxruntime_LINK_LIBS}) target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC "${onnxruntime_SOURCE_DIR}/include")