New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Removed gRPC_PROTOBUF_PACKAGE_TYPE, supporting config only #32988
Conversation
CC: @coryan |
cmake/protobuf.cmake
Outdated
@@ -90,6 +86,6 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package") | |||
set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE}) | |||
endif() | |||
endif() | |||
set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf ${gRPC_PROTOBUF_PACKAGE_TYPE})\nendif()") | |||
set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf CONFIG)\nendif()") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but this is going into gRPCConfig.cmake
, you should use find_dependency()
and not find_package()
in those:
https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html
https://stackoverflow.com/questions/50263280/difference-between-find-dependency-and-find-package-in-cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's a good point. Thanks! Updated this and will update others too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to include(CMakeFindDependencyMacro)
to use find_dependency
. #33361
…rpc#32988) `FindProtobuf` isn't working as Protobuf began to use Abseil so gRPC is now using `CONFIG` mode for protobuf module (Context: https://gitlab.kitware.com/cmake/cmake/-/issues/24321)
…rpc#32988) `FindProtobuf` isn't working as Protobuf began to use Abseil so gRPC is now using `CONFIG` mode for protobuf module (Context: https://gitlab.kitware.com/cmake/cmake/-/issues/24321)
…32988) `FindProtobuf` isn't working as Protobuf began to use Abseil so gRPC is now using `CONFIG` mode for protobuf module (Context: https://gitlab.kitware.com/cmake/cmake/-/issues/24321)
FindProtobuf
isn't working as Protobuf began to use Abseil so gRPC is now usingCONFIG
mode for protobuf module(Context: https://gitlab.kitware.com/cmake/cmake/-/issues/24321)