Always link federated proto statically (#8442)

This commit is contained in:
Rong Ou 2022-11-08 15:47:38 -08:00 committed by GitHub
parent ca0f7f2714
commit 4449e30184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ find_package(gRPC CONFIG REQUIRED)
message(STATUS "Found gRPC: ${gRPC_CONFIG}")
# Generated code from the protobuf definition.
add_library(federated_proto federated.proto)
add_library(federated_proto STATIC federated.proto)
target_link_libraries(federated_proto PUBLIC protobuf::libprotobuf gRPC::grpc gRPC::grpc++)
target_include_directories(federated_proto PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
xgboost_target_properties(federated_proto)