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.

38 lines
966 B

1 year ago
1 year ago
  1. cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
  2. project(wenet VERSION 0.2)
  3. # set color
  4. string(ASCII 27 Esc)
  5. set(ColourReset "${Esc}[m")
  6. set(BoldGreen "${Esc}[1;32m")
  7. set(BoldRed "${Esc}[31m")
  8. #运行参数
  9. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -fPIC")
  10. set(LIB_BASE_DIR /root/projects/temp_xiaoke/asr_runtime/lib_files)
  11. option(GRPC "whether to build with gRPC" ON)
  12. option(ONNX "whether to build with ONNX" ON)
  13. list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-linux)
  14. # Model Option
  15. if(ONNX)
  16. include(onnx)
  17. endif()
  18. include(openfst)
  19. include_directories(
  20. ${CMAKE_CURRENT_SOURCE_DIR}
  21. ${CMAKE_CURRENT_SOURCE_DIR}/kaldi
  22. )
  23. # Build all libraries
  24. add_subdirectory(utils)
  25. add_subdirectory(frontend)
  26. add_subdirectory(post_processor)
  27. add_subdirectory(kaldi) # kaldi:
  28. add_subdirectory(decoder)
  29. #Connection Option
  30. if(GRPC)
  31. include(grpc)
  32. add_subdirectory(grpc)
  33. endif()
  34. # Build all bins
  35. add_subdirectory(bin)