cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(wenet VERSION 0.2)
|
|
#运行参数
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -fPIC")
|
|
option(GRPC "whether to build with gRPC" ON)
|
|
option(ONNX "whether to build with ONNX" ON)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-linux)
|
|
# Model Option
|
|
if(ONNX)
|
|
include(onnx)
|
|
endif()
|
|
include(openfst)
|
|
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)
|