conan-io / conan-vs-extension

Conan Extension for Visual Studio
https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
MIT License
59 stars 34 forks source link

Indirect dependency files(.props) are not written to the "Include" "lib" directory #253

Open JohnnyKrr opened 2 months ago

JohnnyKrr commented 2 months ago

Module A depends on module B, and module B depends on module C, write in the conanfile.yml: requirements:

danimtb commented 2 months ago

Hi @JohnnyKrr,

Thank you for your issue. I would need more information to be able to help you. Could you describe with more detail why do you mean by "module"? Is that a project inside your VS solution or a conan dependency?

I would need a minimal reproducible example to be able to debug it. Than you 😄

JohnnyKrr commented 2 months ago

Hi @danimtb Thank you for your reply! More detailed description is below. Now there are three VS Projects, ProjectA (Console), ProjectB (dll), ProjectC (dll), I package ProjectB, ProjectC compiled binaries as conan binary packages and export to the local cache. Dependencies: ProjectA->ProjectB->ProjectC. ProjectA is directly dependent on ProjectB, and ProjectA's conandata.yml:

requirements:
- ProjectB/[1.0] 

When compiling ProjectA, the conan plugin generates props files for ProjectB and ProjectC. But in ProjectC's props file, "ConanmoduleCIncludeDirectories", "ConanmoduleCLibraryDirectories" and "ConanmoduleCLibraries" are empty. If ProjectA's conandata.yml writes:

requirements:
- ProjectB/[1.0] 
- ProjectC/[1.0] 

then everything is fine. But I don't want to write that way, because I want to rely on only the top-level packages when the dependencies are deep, and not change ProjectC from an indirect dependency to a direct dependency.