cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(wenet VERSION 0.2)
|
|
# set color
|
|
string(ASCII 27 Esc)
|
|
set(ColourReset "${Esc}[m")
|
|
set(BoldGreen "${Esc}[1;32m")
|
|
set(BoldRed "${Esc}[31m")
|
|
# 运行参数
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -fPIC")
|
|
set(LIB_BASE_DIR /data/jupyter/CXX_ENVS/wenet_runtime)
|
|
set(third_party_libraries)
|
|
option(GRPC "whether to build with gRPC" ON)
|
|
option(ONNX "whether to build with ONNX" ON)
|
|
option(REBUILD "是否重新构筑项目依赖" OFF)
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-linux)
|
|
# Model Option
|
|
if(ONNX)
|
|
include(onnx)
|
|
endif()
|
|
|
|
include(openfst)
|
|
#wenet个人项目内容
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_CURRENT_SOURCE_DIR}/kaldi
|
|
)
|
|
|
|
# Build all libraries
|
|
add_subdirectory(utils)
|
|
add_subdirectory(frontend)
|
|
add_subdirectory(post_processor)
|
|
add_subdirectory(kaldi) # kaldi:
|
|
add_subdirectory(decoder)
|
|
# Connection Option
|
|
if(GRPC)
|
|
include(grpc)
|
|
add_subdirectory(grpc)
|
|
endif()
|
|
|
|
# Build all bins
|
|
add_subdirectory(bin)
|