From 6bdd510a3fb85c7e878a36b8efabd57ca72fd257 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 18 May 2024 16:04:49 +0800 Subject: [PATCH] =?UTF-8?q?2024.5.16=20=E6=B5=8B=E8=AF=95=E6=95=B4?= =?UTF-8?q?=E4=BD=93=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 1 - bin/CMakeLists.txt | 3 ++- bin/decoder_main.cc | 2 +- bin/label_checker_main.cc | 2 +- grpc/CMakeLists.txt | 5 ++++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e286fa5..8e1e4e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,6 @@ add_subdirectory(kaldi) # kaldi: add_subdirectory(decoder) # Connection Option if(GRPC) - include(grpc) add_subdirectory(grpc) endif() diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index 2ca2dbe..d829ea7 100644 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -3,9 +3,10 @@ target_link_libraries(decoder_main PUBLIC decoder) if(IPEX) target_link_libraries(decoder_main PUBLIC "${TORCH_IPEX_LIBRARIES}") endif() +message(STATUS "gflags_LIBRARIES: ${gflags_LIBRARIES}") add_executable(label_checker_main label_checker_main.cc) -target_link_libraries(label_checker_main PUBLIC decoder) +target_link_libraries(label_checker_main PUBLIC decoder gflags_nothreads_static) if(TORCH) add_executable(api_main api_main.cc) diff --git a/bin/decoder_main.cc b/bin/decoder_main.cc index ef05cfa..668c99d 100644 --- a/bin/decoder_main.cc +++ b/bin/decoder_main.cc @@ -18,7 +18,7 @@ #include "decoder/params.h" #include "frontend/wav.h" -#include "utils/flags.h" +#include #include "utils/wn_string.h" #include "utils/thread_pool.h" #include "utils/timer.h" diff --git a/bin/label_checker_main.cc b/bin/label_checker_main.cc index 5c460f7..25722af 100644 --- a/bin/label_checker_main.cc +++ b/bin/label_checker_main.cc @@ -19,7 +19,7 @@ #include "decoder/params.h" #include "frontend/wav.h" -#include "utils/flags.h" +#include #include "utils/wn_string.h" DEFINE_string(text, "", "kaldi style text input file"); diff --git a/grpc/CMakeLists.txt b/grpc/CMakeLists.txt index ed8a346..f4c3778 100644 --- a/grpc/CMakeLists.txt +++ b/grpc/CMakeLists.txt @@ -1,5 +1,8 @@ # compile wenet.proto set(PROTO_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +include(../cmake-linux/grpc.cmake) + add_custom_command( OUTPUT ${PROTO_DIR}/wenet.pb.cc ${PROTO_DIR}/wenet.pb.h @@ -15,7 +18,7 @@ add_custom_command( # grpc_server/client link_directories(${protobuf_BINARY_DIR}/lib) -add_library(wenet_grpc STATIC +add_library(wenet_grpc SHARED grpc_client.cc grpc_server.cc wenet.pb.cc