Skip to content

Commit

Permalink
Supports coexistence of multiple protobuf versions (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
lqxhub authored Jul 28, 2024
1 parent c8e0cde commit 5c5b95f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/braft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ExternalProject_Add(
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
-DCMAKE_CXX_FLAGS=${BRAFT_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX}
-DCMAKE_LIBRARY_PATH=${LIB_INSTALL_PREFIX}
-DBRPC_LIB=${BRPC_LIBRARIES}
-DBRPC_INCLUDE_PATH=${BRPC_INCLUDE_DIR}
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
Expand All @@ -38,7 +39,7 @@ ExternalProject_Add(
-DGFLAGS_LIB=${GFLAGS_LIBRARIES}

-DPROTOC_LIB=${PROTOC_LIBRARY}
-DPROTOBUF_LIBRARIES=${PROTOBUF_LIBRARY}
-DPROTOBUF_LIBRARY=${PROTOBUF_LIBRARY}
-DPROTOBUF_INCLUDE_DIRS=${PROTOBUF_INCLUDE_DIR}
-DPROTOBUF_PROTOC_EXECUTABLE=${PROTOBUF_PROTOC}
-DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR}
Expand Down
3 changes: 3 additions & 0 deletions cmake/brpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ExternalProject_Add(
-DCMAKE_CPP_FLAGS=${CMAKE_CPP_FLAGS}
-DCMAKE_INSTALL_PREFIX=${BRPC_INSTALL_DIR}
-DCMAKE_FIND_LIBRARY_SUFFIXES=${LIB_INSTALL_PREFIX}
-DCMAKE_LIBRARY_PATH=${LIB_INSTALL_PREFIX}
-DGFLAGS_INCLUDE_PATH=${GFLAGS_INCLUDE_DIR}
-DBUILD_SHARED_LIBS=FALSE
-DBUILD_BRPC_TOOLS=OFF
Expand All @@ -34,7 +35,9 @@ ExternalProject_Add(

-DPROTOC_LIB=${PROTOC_LIBRARY}
-DPROTOBUF_LIBRARIES=${PROTOBUF_LIBRARY}
-DProtobuf_LIBRARIES=${PROTOBUF_LIBRARY}
-DPROTOBUF_INCLUDE_DIRS=${PROTOBUF_INCLUDE_DIR}
-DProtobuf_INCLUDE_DIR=${PROTOBUF_INCLUDE_DIR}
-DPROTOBUF_PROTOC_EXECUTABLE=${PROTOBUF_PROTOC}

-DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR}
Expand Down

0 comments on commit 5c5b95f

Please sign in to comment.