From 5280c71b70197887c9a901f4f540d63d3bae0458 Mon Sep 17 00:00:00 2001 From: nmreadelf <7260482+nmreadelf@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:28:25 +0800 Subject: [PATCH] fix build test_log linked error fix build test_log linked error --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 110daa30..378e06f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,10 @@ if(BRPC_WITH_GLOG) include_directories(${GLOG_INCLUDE_PATH}) endif() +if(BRPC_WITH_THRIFT) + find_library(THRIFT_LIB NAMES thrift) +endif() + if(LEVELDB_WITH_SNAPPY) find_library(SNAPPY_LIB NAMES snappy) endif() @@ -126,6 +130,12 @@ if(LEVELDB_WITH_SNAPPY) ) endif() +if(BRPC_WITH_THRIFT) + set(DYNAMIC_LIB ${DYNAMIC_LIB} + ${THRIFT_LIB} + ) +endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(DYNAMIC_LIB ${DYNAMIC_LIB} pthread