-
Notifications
You must be signed in to change notification settings - Fork 996
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] Header files are not found when downloading a package #17699
Comments
Hi @omgronny Thanks for your question.
Thanks for the feedback! |
Actually, headers are not there after the first step:
|
Great, thanks for the feedback. Some quick feedback about your recipe: it has The Recall that in any case the |
Thanks, I removed the And I figured out that it is two packages upload:
And the second one is actually contains Could you please help me with proper including the second package to my project?
And I get on
How can I specify it? |
Those are not 2 packages, that is 1 recipe + 1 package binary built from that recipe.
You don't need to do anything special to include it in your project, just treat it as any other package, for example as the You need:
You don't have to worry about the location of the project in the cache, no need to do |
Okay, thanks, now I understand more about conan. Returning to your first message. I did run
But I still get the same error The result of
|
The output of It would be necessary to reproduce the issue, please provide:
|
cmake output. It actually runs successfully.
But when I run
|
The issue is in the The recommended way to do it is that there should be a Then, it is necessary to pass the toolchain, either via:
This will greatly simplify your CMake code, your conanfiles and will help to scale much easier, add more dependencies with just 1 line. If you want cmake to call You might also be interested in tracking the progress in "Workspaces", like #17675, see https://docs.conan.io/2/incubating.html -> Workspaces, a feature oriented to be able to work simultaneously on different Conan packages. |
Thank you I actually have the line Also, the I removed the line with but now at this exact line I get an error
I actually have in my
But I think it was not called in Previous time I was trying to use |
The toolchain files in CMake are not intended to be defined in
It is not about just that line. The whole definition of the You can do a quick proof of concept, something like this:
Please try that and let us know.
Neither |
Yes, it helped, thank you! I still have some problems with proto cmake targets, but |
@memsharded could you please help me with a further problem: I test my package with two copies of repo: my
And I noticed that the path in error refers to I include mimalloc in project via this in
How can I fix the linker issue? |
I am not sure why you are using something like The |
Yes, I get it now, and my linker problems have solved. I should have added proper I got that any conan-specific things are not recommended in cmake. But could you please explain how to get a package path inside of cmake file? I also have some logic for generating proto-files depends on wether I have my In conan 1.x I was doing it via So how can I do it? |
UPD: I found out that I suppose this is the solution |
The recommended way is decoupling responsibilities and abstracting that away in the build system:
|
Well, it definitely makes sense Thank you for your help, it is compiling now |
Happy that it is compiling now and happy to help! Thanks to you for the feedback. |
What is your question?
Hello!
I migrate my project from conan1.x to conan2, and I have an issue when trying to use my uploaded package
I create a package using
conan export-pkg conanfile.py --name <name> --version <version>
using pre-built binaries and libs. And I get:So I consider my header files packaged
After that, I run
conan upload
an it runs successfully.But when I try to use my package in different project, I get an error
fatal error: '<header>.h' file not found
even after successfulconan install
When I run
conan cache path
, and list the directory, I see that there is no header files:But how I can get the package with all the headers?
Can you please help me with that?
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: