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.

41 lines
1017 B

  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 -w")
  10. set(LIB_BASE_DIR /root/CXX_ENVS/wenet_runtime)
  11. set(third_party_libraries)
  12. option(GRPC "whether to build with gRPC" ON)
  13. option(ONNX "whether to build with ONNX" ON)
  14. list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-linux)
  15. # Model Option
  16. if(ONNX)
  17. include(onnx)
  18. endif()
  19. include(openfst)
  20. #wenet个人项目内容
  21. include_directories(
  22. ${OPENFST_INCLUDE_DIR}
  23. ${CMAKE_CURRENT_SOURCE_DIR}
  24. ${CMAKE_CURRENT_SOURCE_DIR}/kaldi
  25. )
  26. # Build all libraries
  27. add_subdirectory(utils)
  28. add_subdirectory(frontend)
  29. add_subdirectory(post_processor)
  30. add_subdirectory(kaldi) # kaldi:
  31. add_subdirectory(decoder)
  32. # Connection Option
  33. if(GRPC)
  34. add_subdirectory(grpc)
  35. endif()
  36. # Build all bins
  37. add_subdirectory(bin)