Open leviskim17 opened 6 days ago
Hi @leviskim17
Thanks for your question.
After downloading the zlib library through NuGet in Conan,
Sorry, it is not very clear what you are trying to achieve. Why would you download it from Nuget?
Some important notes:
source()
method must be invariant. It should always download exactly the same sources, but this is not what you are doing. Conditionals in source()
are explicitly forbidden, access to settings/options will fail, but you are avoiding that unpexectedly using self.info
in a place that can be broken for some cases like the local flow.self.src_url = urllib.parse.urljoin(baseUrl, data["Windows"]["inc"])
in the recipe, so even if the setting -s os=Linux
it will still download the Windows binary, not the Linux one. 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.
If you still need to go this way, I'd suggest to just do the downloads in the build()
method as explained in the docs: https://docs.conan.io/2/tutorial/creating_packages/other_types_of_packages/package_prebuilt_binaries.html#downloading-and-packaging-pre-built-binaries. Do everything in the build()
method, do not use source()
or layout()
for any of this logic.
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
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?