diff --git a/CMakeLists.txt b/CMakeLists.txt index a28ff75..8db603a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,14 @@ 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 /root/projects/temp_xiaoke/asr_runtime/lib_files) option(GRPC "whether to build with gRPC" ON) option(ONNX "whether to build with ONNX" ON) diff --git a/cmake-linux/onnx.cmake b/cmake-linux/onnx.cmake index c63326c..13abf0a 100644 --- a/cmake-linux/onnx.cmake +++ b/cmake-linux/onnx.cmake @@ -1,8 +1,9 @@ -FetchContent_Declare(onnxruntime - SOURCE_DIR ${LIB_BASE_DIR}/onnxruntime-src) -FetchContent_MakeAvailable(onnxruntime) + +set(onnxruntime_SOURCE_DIR ${LIB_BASE_DIR}/onnxruntime-src) include_directories(${onnxruntime_SOURCE_DIR}/include) link_directories(${onnxruntime_SOURCE_DIR}/lib) -list(APPEND third_party_libraries onnxruntime) \ No newline at end of file +list(APPEND third_party_libraries onnxruntime) + +add_definitions(-DUSE_ONNX) \ No newline at end of file