-
Notifications
You must be signed in to change notification settings - Fork 994
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] Editable packages and public linked libraries #15468
Comments
Thanks for your question
It is not very clear what you mean. It is possible to have multiple conanfiles even in the same folder, like
I think this is the default visibility of headers. When
Please let me know if this helps |
Thank you for your reply.
I meant pulling dependencies via In my case, |
Yes,
Yes, definitely it shouldn't be necessary to put everything in the consumer. But yes, the way to achieve this would be to drop the |
Any plans on allowing Conan to pull directly from git? But are the targets (generated?) by conan the same targets from the CMakeFiles.txt from my packages? Because why do I have to specify the |
Not directly pulling, but we are trying to be able to use a local folder with recipes (like conan-center-index) to be usable as remote here, please track this issue: #13930
Because parsing CMake files is almost impossible to do it reliably and work for all cases. Plus there are many other build systems supported by Conan like Meson, Autotools, MSBuild... automatically deducing the includedirs from all of them is impossible, and at the end of the day 99% of times it is just adding a line |
Ok, thank you for your explanation. I'll guess Conan won't work for my use case then. |
I think the For the "running conan install", we also have the |
What is your question?
Following problem: I've got a project that pulls in some packages via Conan 2 and one single private package added via
editable add
, that also uses some packages. The reason for that private package being a Conan package is, that it seems to be the only option to have multipleconanfile.txt
/conanfile.py
files (FetchContent + conanfile.txt in the fetched project seems to be not an option).I export multiple components from that package via:
The
mypkg
has sometarget_link_library(c1 PUBLIC lib-abc)
Now, if I link to
mypkg::c1
, it seems the INCLUDE_DIRECTORIES property is not set correctly.The consumer of
mypkg::c1
is unable to see where the public header files oflib-abc
should come from. Am I doing something completely wrong? Are the target imported viafind_package(mypgk REQUIRED c1)
not the “real” CMake targets, but some targets generated by Conan? I already had to set theincludedirs
property, because the CMake's target properties were set to the Conan default ofinclude
.How is it possible to have nested non-Conan projects/libs that each have their own conanfile.txt? A hack would be to scan for each
conanfile.txt
pre-build and merge them, but that won't work withFetchContent
either… this is really frustrating, any ideas?Note: I have no
install(...)
instructions in mymypkg
's CMake. Are they strictly needed?Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: