Skip to content

Commit

Permalink
Flexible find protobuf. (#9867)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis authored Dec 11, 2023
1 parent 5623521 commit b3700bb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugin/federated/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# gRPC needs to be installed first. See README.md.
set(protobuf_MODULE_COMPATIBLE TRUE)
set(protobuf_BUILD_SHARED_LIBS TRUE)
find_package(Protobuf CONFIG REQUIRED)

find_package(Protobuf CONFIG)
if(NOT Protobuf_FOUND)
find_package(Protobuf)
endif()
if(NOT Protobuf_FOUND)
# let CMake emit error
find_package(Protobuf CONFIG REQUIRED)
endif()

find_package(gRPC CONFIG REQUIRED)
message(STATUS "Found gRPC: ${gRPC_CONFIG}")

Expand Down

0 comments on commit b3700bb

Please sign in to comment.