Committed by
GitHub
fixed broken build when user provides their own onnxruntime library (#201)
正在显示
1 个修改的文件
包含
5 行增加
和
1 行删除
| @@ -247,7 +247,11 @@ endif() | @@ -247,7 +247,11 @@ endif() | ||
| 247 | message(STATUS "location_onnxruntime_header_dir: ${location_onnxruntime_header_dir}") | 247 | message(STATUS "location_onnxruntime_header_dir: ${location_onnxruntime_header_dir}") |
| 248 | 248 | ||
| 249 | if(DEFINED ENV{SHERPA_ONNXRUNTIME_LIB_DIR}) | 249 | if(DEFINED ENV{SHERPA_ONNXRUNTIME_LIB_DIR}) |
| 250 | - set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.so) | 250 | + if(APPLE) |
| 251 | + set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.dylib) | ||
| 252 | + else() | ||
| 253 | + set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.so) | ||
| 254 | + endif() | ||
| 251 | if(NOT EXISTS ${location_onnxruntime_lib}) | 255 | if(NOT EXISTS ${location_onnxruntime_lib}) |
| 252 | set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.a) | 256 | set(location_onnxruntime_lib $ENV{SHERPA_ONNXRUNTIME_LIB_DIR}/libonnxruntime.a) |
| 253 | endif() | 257 | endif() |
-
请 注册 或 登录 后发表评论