Skip to content

Commit

Permalink
fix cmake: find gRPC before Protobuf
Browse files Browse the repository at this point in the history
0716164776db53f9fa43452c5e68790b2305e7db
  • Loading branch information
Anton3 committed Jun 28, 2024
1 parent 066b8a0 commit c0c6657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/GrpcTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ include_guard(GLOBAL)

# Pack initialization into a function to avoid non-cache variable leakage.
function(_userver_prepare_grpc)
include("${CMAKE_CURRENT_LIST_DIR}/SetupProtobuf.cmake")
if(USERVER_CONAN)
find_package(gRPC REQUIRED)
get_target_property(PROTO_GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION)
Expand All @@ -30,6 +29,7 @@ function(_userver_prepare_grpc)
else()
include("${CMAKE_CURRENT_LIST_DIR}/SetupGrpc.cmake")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/SetupProtobuf.cmake")
set_property(GLOBAL PROPERTY userver_grpc_cpp_plugin "${PROTO_GRPC_CPP_PLUGIN}")
set_property(GLOBAL PROPERTY userver_grpc_python_plugin "${PROTO_GRPC_PYTHON_PLUGIN}")
set_property(GLOBAL PROPERTY userver_protobuf_protoc "${PROTOBUF_PROTOC}")
Expand Down

0 comments on commit c0c6657

Please sign in to comment.