From 5f475b5df4baf0226f87e232b514da976bfd83dd Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Wed, 21 Feb 2024 15:36:54 +0800 Subject: [PATCH] Link the math lib. (#592) --- sherpa-onnx/csrc/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) 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()