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.
 
 
 

30 lines
811 B

cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(wenet VERSION 0.1)
# 测试模块参数设置
option(GRPC "build with gRPC" OFF)
option(ONNX "build with onnx" ON)
# set color
string(ASCII 27 Esc)
set(ColourReset "${Esc}[m")
set(BoldGreen "${Esc}[1;32m")
set(Red "${Esc}[31m")
include(FetchContent)
set(FETCHCONTENT_QUIET OFF)
set(third_party_libraries)
# -build和-subbuild文件夹在的地方
set(LIB_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib_files)
set(FETCHCONTENT_BASE_DIR ${LIB_BASE_DIR})
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-local)
if(GRPC)
include(grpc)
add_subdirectory(bin_grpc)
endif()
if(ONNX)
include(onnx)
add_executable(main "onnx.cc")
target_link_libraries(main ${third_party_libraries})
endif()
# 只需要link一个库列表