You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

  1. cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
  2. project(kaldi)
  3. # include_directories() is called in the root CMakeLists.txt.test.bak1.bak
  4. add_library(kaldi-util
  5. base/kaldi-error.cc
  6. base/kaldi-math.cc
  7. util/kaldi-io.cc
  8. util/parse-options.cc
  9. util/simple-io-funcs.cc
  10. util/text-utils.cc
  11. )
  12. target_link_libraries(kaldi-util PUBLIC utils)
  13. add_library(kaldi-decoder
  14. lat/determinize-lattice-pruned.cc
  15. lat/lattice-functions.cc
  16. decoder/lattice-faster-decoder.cc
  17. decoder/lattice-faster-online-decoder.cc
  18. )
  19. target_link_libraries(kaldi-decoder PUBLIC kaldi-util)
  20. if(GRAPH_TOOLS)
  21. # Arpa binary
  22. add_executable(arpa2fst
  23. lm/arpa-file-parser.cc
  24. lm/arpa-lm-compiler.cc
  25. lmbin/arpa2fst.cc
  26. )
  27. target_link_libraries(arpa2fst PUBLIC kaldi-util)
  28. # FST tools binary
  29. set(FST_BINS
  30. fstaddselfloops
  31. fstdeterminizestar
  32. fstisstochastic
  33. fstminimizeencoded
  34. fsttablecompose
  35. )
  36. if(NOT MSVC)
  37. # dl is for dynamic linking, otherwise there is a linking error on linux
  38. link_libraries(dl)
  39. endif()
  40. foreach(name IN LISTS FST_BINS)
  41. add_executable(${name}
  42. fstbin/${name}.cc
  43. fstext/kaldi-fst-io.cc
  44. )
  45. target_link_libraries(${name} PUBLIC kaldi-util)
  46. endforeach()
  47. endif()