-
Notifications
You must be signed in to change notification settings - Fork 990
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
[bug] CMakeDeps
only looks at top level cmake_build_modules
#10272
Comments
Please check https://docs.conan.io/en/latest/reference/conanfile/tools/cmake/cmakedeps.html#build-context-activated. Build-requires need to be explicitly activated and found, the reason is that there are 2 different packages for protobuf, one in the host context and other in the build context. So it is impossible that Alternatively, you might want to try to call |
Thanks but I don't see how that relates to my problem. After digging deeper into the code, it seems that having only top level build modules is intentional and the problem is that component properties (including conan/conans/model/new_build_info.py Lines 178 to 180 in 70763b6
I prefer to keep the cmake code calling |
I think this may be the same issue I'm running into. Running the older version
But if I update to Conan
I have tried using
I've resorted to doing the following to include them manually which seems to work but I don't think should really be necessary:
|
@memsharded I am using protobuf as regular requires not tool_requires and protobuf cmake_build_modules aren't set when I am trying to consume it using CMakeDeps generator. |
packages setting
cmake_build_modules
on a component, like protobuf, can't be used with CMakeDeps:conan/conan/tools/cmake/cmakedeps/templates/target_data.py
Line 84 in 70763b6
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
apply this patch to conan-center-index:
protobuf test_package patch
then execute
Logs (Executed commands with output) (Include/Attach if Applicable)
The text was updated successfully, but these errors were encountered: