fixed broken build when user provides their own onnxruntime library (#201)
This commit is contained in:
@@ -247,7 +247,11 @@ endif()
|
||||
message(STATUS "location_onnxruntime_header_dir: ${location_onnxruntime_header_dir}")
|
||||
|
||||
if(DEFINED ENV{SHERPA_ONNXRUNTIME_LIB_DIR})
|
||||
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.so)
|
||||
if(APPLE)
|
||||
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.dylib)
|
||||
else()
|
||||
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.so)
|
||||
endif()
|
||||
if(NOT EXISTS ${location_onnxruntime_lib})
|
||||
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.a)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user