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.

32 lines
776 B

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