-
Notifications
You must be signed in to change notification settings - Fork 357
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
[question] Components hide global definitions in layout method #3592
Comments
Hi @marausch Thanks for your question. Your observations are right, once components are defined, the global I have tried to make it that way, because it would be a bit more intuitive, in conan-io/conan#13994. But I finally dropped it, too risky, almost impossible to do it without breaking. |
Hi @memsharded, I was just asking because I probably didn't read the documentation thoroughly (I haven't found where this is explained in the documentation). Thank you. |
Thats fair, moving this ticket to docs, lets try to add some clarification. |
Environment details
Description
Hi,
When using components in the
layout
method for a dependency module, it seems that what gets defined throughself.cpp.package.includedirs
,self.cpp.package.libdirs
, and so on is ignored when CMake related file are generated by aconan install
for a consumer of the module.For example, consider a
layout
method of the dependency's Conanfile containing:but no component related definitions.
In this case the
conan_toolchain.cmake
file generated for a consumer contains something like:By adding just any single component related definition to the
layout
method, for example:what gets generated in the consumer's
conan_toolchain.cmake
becomes like this:i.e. with the default
"include"
instead of"inc"
, as if noself.cpp.package.includedirs
had been defined.To get the expected
conan_toolchain.cmake
we need to add the properincludedirs
definition for the component:The same thing is true for
libdirs
,resdirs
and probably others too (I haven't tested them all).I guess this might be the wanted behaviour, even if I expected the global definitions to be concatenated (in case) with the components related ones.
Thank you in advance for any clarification.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: