#24771·protobuf

CMake find_package requires CONFIG mode

Author: mkruskal-googleCreated Dec 9, 2025Updated Sep 22, 2026
Labelscmakekeep open

The FindProtobuf module has shipped with cmake since version 3.6, but it is no longer compatible with our cmake setup.

If you use module mode of find_package by typing something like:

find_package(Protobuf)

You will end up with a bad configuration and a broken build. To get this to work you must use config mode like:

find_package(Protobuf CONFIG)

which will use the cmake configs we ship with our package.

Source: protocolbuffers/protobuf