diff --git a/sherpa-onnx/csrc/CMakeLists.txt b/sherpa-onnx/csrc/CMakeLists.txt index ffbe90ce2..cc576634a 100644 --- a/sherpa-onnx/csrc/CMakeLists.txt +++ b/sherpa-onnx/csrc/CMakeLists.txt @@ -143,6 +143,8 @@ else() target_link_libraries(sherpa-onnx-core ${onnxruntime_lib_files}) endif() +target_link_libraries(sherpa-onnx-core -lm) + if(NOT BUILD_SHARED_LIBS AND APPLE) target_link_libraries(sherpa-onnx-core "-framework Foundation") endif()