diff --git a/cmake/kaldi-decoder.cmake b/cmake/kaldi-decoder.cmake index 53d8c03e3..ac2482bd0 100644 --- a/cmake/kaldi-decoder.cmake +++ b/cmake/kaldi-decoder.cmake @@ -52,13 +52,25 @@ function(download_kaldi_decoder) ${kaldi-decoder_SOURCE_DIR}/ ) if(SHERPA_ONNX_ENABLE_PYTHON AND WIN32) - install(TARGETS kaldi-decoder-core DESTINATION ..) + install(TARGETS + kaldi-decoder-core + kaldifst_core + fst + DESTINATION ..) else() - install(TARGETS kaldi-decoder-core DESTINATION lib) + install(TARGETS + kaldi-decoder-core + kaldifst_core + fst + DESTINATION lib) endif() if(WIN32 AND BUILD_SHARED_LIBS) - install(TARGETS kaldi-decoder-core DESTINATION bin) + install(TARGETS + kaldi-decoder-core + kaldifst_core + fst + DESTINATION bin) endif() endfunction() diff --git a/cmake/kaldifst.cmake b/cmake/kaldifst.cmake index b89d3bd4c..b08329177 100644 --- a/cmake/kaldifst.cmake +++ b/cmake/kaldifst.cmake @@ -42,7 +42,7 @@ function(download_kaldifst) list(APPEND CMAKE_MODULE_PATH ${kaldifst_SOURCE_DIR}/cmake) - add_subdirectory(${kaldifst_SOURCE_DIR} ${kaldifst_BINARY_DIR}) + add_subdirectory(${kaldifst_SOURCE_DIR} ${kaldifst_BINARY_DIR} EXCLUDE_FROM_ALL) target_include_directories(kaldifst_core PUBLIC @@ -56,13 +56,6 @@ function(download_kaldifst) set_target_properties(kaldifst_core PROPERTIES OUTPUT_NAME "sherpa-onnx-kaldifst-core") set_target_properties(fst PROPERTIES OUTPUT_NAME "sherpa-onnx-fst") - - if(KHG_BUILD_PYTHON AND WIN32) - install(TARGETS kaldifst_core fst DESTINATION ..) - else() - install(TARGETS kaldifst_core fst DESTINATION lib) - endif() - endfunction() download_kaldifst()