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}")
|
message(STATUS "location_onnxruntime_header_dir: ${location_onnxruntime_header_dir}")
|
||||||
|
|
||||||
if(DEFINED ENV{SHERPA_ONNXRUNTIME_LIB_DIR})
|
if(DEFINED ENV{SHERPA_ONNXRUNTIME_LIB_DIR})
|
||||||
|
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)
|
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.so)
|
||||||
|
endif()
|
||||||
if(NOT EXISTS ${location_onnxruntime_lib})
|
if(NOT EXISTS ${location_onnxruntime_lib})
|
||||||
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.a)
|
set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.a)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user