Skip to content

Commit

Permalink
fix some compile problem like
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzhg committed Aug 11, 2022
1 parent 6495704 commit b75c58b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ include_directories(
${OPENSSL_INCLUDE_DIR}
)

set(WL_START_GROUP "-Wl,--start-group")
set(WL_END_GROUP "-Wl,--end-group")

set(DYNAMIC_LIB
${WL_START_GROUP}
${GFLAGS_LIBRARY}
${PROTOBUF_LIBRARIES}
${LEVELDB_LIB}
Expand All @@ -220,7 +224,7 @@ else()
list(APPEND DYNAMIC_LIB ${OPENSSL_SSL_LIBRARY})
endif()

set(BRPC_PRIVATE_LIBS "-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz")
set(BRPC_PRIVATE_LIBS ${WL_START_GROUP} "-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz")

if(WITH_GLOG)
set(DYNAMIC_LIB ${DYNAMIC_LIB} ${GLOG_LIB})
Expand Down Expand Up @@ -249,6 +253,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_ProfilerStop")
endif()

set(DYNAMIC_LIB "${DYNAMIC_LIB} ${WL_END_GROUP}")
set(BRPC_PRIVATE_LIBS "${BRPC_PRIVATE_LIBS} ${WL_END_GROUP}")

# for *.so
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output/lib)
# for *.a
Expand Down

0 comments on commit b75c58b

Please sign in to comment.