-
Notifications
You must be signed in to change notification settings - Fork 952
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] Please help how to use NuGet Libraries with Conan and CMake for Builds. #16536
Comments
Hi @leviskim17 Thanks for your question.
Sorry, it is not very clear what you are trying to achieve. Why would you download it from Nuget? Some important notes:
I would suggest just building from source the combinations that you need, it is going to be much faster and simpler than trying to fetch them as pre-built from other place. |
@memsharded Thanks for your comment. I think it was the issue of CMake of libpng. Maybe. It is the compony policy to use prebuilt libraries through nuget. So I have implemented to use nuget from the company Artifactory. After chaning of package_info to
From lowercase to uppercase, it is working. Thanks for your helps. |
Conan integrates the full lifecycle of creating the packages from source and managing the binaries with less effort than having to have a separate build process that uploads the binaries to nuget first. Specially, when those libraries start to have their own dependencies (zlib is easy, as it doesn't have dependencies) then the process gets more and more complicated if having to download dependencies (via Conan?) build the binary, upload the binary to nuget, then have another recipe that downloads the binary from nuget? That would be terribly complicated for something that Conan can manage very easily. While I understand that there might be company policies, I suggest to propose simplifying that process when it starts getting complicated, you will waste more time, effort and money to make it work. And Conan packages are stored in Artifactory as well, it is not that they are not traceable and manageable.
Ok, so I guess the main issue is solved then? May we close the ticket as resolved? Thanks. |
What is your question?
conanfile - libpng.txt
conandata.yml-libpng.txt
conanfile - zlib.txt
conandata.yml-zlib.txt
conan version: 2.2.3
Situation
After downloading the zlib library through NuGet in Conan, I encountered an issue where CMake could not find zlib when building the libpng package in Conan
Attempts Made
When I checked conan_toolchain.cmake in C:\Users\kimjas.conan2\p\b*libpnb1f2c624ba939*\b\build\generators, I can see CMake configurations for zlib lib, include, bin locations related. However, why is it that the zlib downloaded as NuGet cannot be recognized by CMake in the libpng package?
Are there any further steps required, beyond the attached conanfile, to ensure the usage of the zlib package downloaded from NuGet? Any advice would be greatly appreciated.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: