-
Notifications
You must be signed in to change notification settings - Fork 993
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
Best way to set up conan for multiple subprojects #11067
Comments
Hi @fittyCent First, some questions to understand your case:
If the case is using third party dependencies my recommendation would be:
|
Thanks @memsharded. That helped A TON! I am just consuming third party dependencies and your workflow makes a whole lot of sense. I'm still working on ironing out all the kinks and I'll close this discussion as soon as I confirm this workflow doesn't hit roadblocks (if you don't mind). Seems like most of the docs I read indicated that |
Happy to hear that! :) :)
Yes, we are aware of this. This is the reason that for the new 2.0 docs (https://docs.conan.io/en/2.0-alpha/tutorial/consuming_packages.html), we are giving way more relevance to using conanfile.py as consumer, introducing it in the main flow of the main getting started tutorial. |
hey @memsharded, thanks for your response. I got pulled off to do something else and I'm back at this, sorry. I'm stuck somewhere and I've been trying to get through this for some time now. Here's my setup so far:
Any idea how I'd make this work? Thanks in advance!! |
Hi @fittyCent I think the main conceptual thing is that you are trying to define a dependency from project2->project1 without actually modelling such dependency. When I was taking above about 1 conanfile to serve multiple subprojects, I was assuming there were actual subprojects, in which you can leverage CMake to But when I see your Also you should probably not be doing The thing is that CMake doesn't know how to connect independent projects, and something is necessary, there are different alternatives:
I would probably try the first one first. I would try to avoid the second, and if I needed more power, like making Please let me know if this clarifies it a little bit. |
Hi @memsharded Sorry for the late post. I wanted to get something working with my weird set up before I responded. Here's what I did:
Thanks for your help and pointers on what I was doing wrong! |
Hi @fittyCent Thanks for following up and reporting your setup. Just one small recommendation:
Also, at some point (not necessarily now, but later) you might want to try the |
@memsharded Hi, I'm currently googling things and maybe you know something about it as I barely see any info about that. Small recap. In this video it is presented how nice Question is whether it is possible to do something like that on linux/macOS? Is it possible to do that with CLion IDE? |
I don't think so, because that depends on the IDE. CLion being cmake-based, it is not possible to plug-in subprojects like in VS. Linux/MacOS, depends on the build system mostly (the underlying build-system, not CMake), so in general it is not possible. For those environments the recomendation would be:
|
Situation
What I have so far for Windows
$(OutputDir)\.conan
. So when I "conan install" a project through the tool, there are importantconan*.props
that the project would import. Theseprops
are now in the output folder (e.g.x64/Debug
) that's ignored by git. If I pushed the repo in this state, the next guy who clones it won't be able to open the solution because the projects now reference theprops
but they're not present.$(SolutionDir)\.conan
. Is this the common way to do it?$(OutputDir)\.conan
and screwing up the repo?I could be doing this all wrong so any best practices tips will be greatly appreciated.
The text was updated successfully, but these errors were encountered: