Commit 43b5855d authored by zhujiashun's avatar zhujiashun

change the way of finding threads

parent a93435fb
......@@ -60,12 +60,15 @@ if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-aligned-new")
endif()
find_package(Threads REQUIRED)
#find_package(Threads REQUIRED)
#find_path(GFLAGS_HEADER NAMES gflags/gflags.h)
#find_library(GFLAGS_LIB NAMES gflags)
#find_package(gflags REQUIRED)
find_path(THREADS_HEADER NAMES pthread.h)
find_library(THREADS_LIB NAMES pthread)
find_path(PROTOBUF_HEADER NAMES google/protobuf/stubs/common.h)
find_library(PROTOBUF_LIB NAMES protobuf)
......@@ -85,6 +88,7 @@ include_directories(
${PROTOBUF_HEADER}
${LEVELDB_HEADER}
${THREAD_HEADER}
${THREADS_HEADER}
)
# for *.so
......
......@@ -190,7 +190,8 @@ add_library(brpc SHARED ${SOURCES})
add_library(brpc_static STATIC ${SOURCES})
target_link_libraries(brpc
${CMAKE_THREAD_LIBS_INIT}
#${CMAKE_THREAD_LIBS_INIT}
${THREADS_LIB}
#${GFLAGS_LIB}
${GFLAGS_LIBRARY}
${PROTOBUF_LIB}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment