-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Using find_package(Protobuf) with 3.0.0 #1931
Comments
Hello @Osse, |
I think I got a conception of what all this is about. The config mode was the original mode with CMake and remained so for some time. That was how all third-party packages, protobuf included, advertised their targets and variables and allowed for their discoverability. Then later on came the module mode as the modern way to discover packages and get information about them, rendering the config mode somewhat obsolete(albeit still supported). protobuf originally introduced the function |
I don't agree, CONFIG is more desirable according to the CMake developers. To me, it would be most desirable to be able to find protobuf like so: Otherwise, right now, my call to
So, currently, I have to check all the cmake variables of the libraries are found after find_package anyways. Why does Protobuf not distribute a CONFIG script with the COMPONENT support? Ceres does. |
Hi,
I asked this on Google Groups and was advised to ask here and grab the attention of @podsvirov and @yeswalrus .
As of 3.0.0 the CMake module requires us to set
protobuf_MODULE_COMPATIBLE
in order to get the benefits of the module code such asprotobuf_generate_cpp()
. The example seems to refer to this as "legacy compatibility mode" but the commit message says it is "improved". I must admit I am a CMake newbie to begin with, but in any case I don't quite understand the intention: Am I supposed to set this variable? Am I supposed to not set it unless I have to?Thanks,
Øsse
The text was updated successfully, but these errors were encountered: