FindProtobuf: Migration to upstream ProtobufConfig.cmake
Protobuf now provides a CMake Package Configuration file for find_package(Protobuf CONFIG)
, but only when it is built with CMake. The FindProtobuf module prevents that from being used directly with find_package(Protobuf)
. Ideally the latter should work without a find module, so !8045 (closed) proposes a policy to remove the FindProtobuf module and always rely on ProtobufConfig.cmake
. However, discussion in that MR determined that the ecosystem is not yet ready.
In order for find_package(Protobuf)
to be reliable without the find module, Protobuf must provide a CMake package configuration file. That means if Protobuf provides a build system other than CMake, it still needs to provide a hand-generated ProtobufConfig.cmake
.
This issue tracks progress.