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