From 4de07727439f4f76176ab9dfedab8d45bb498313 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 9 May 2024 17:55:36 +0800 Subject: [PATCH] =?UTF-8?q?2024.5.9-=E6=97=A0fetch=5Fcontent=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 6 ++++++ cmake-linux/onnx.cmake | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) 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