You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that packages references dependencies at a package level, and that I can resolve the package dependencies in my custom generator:
for require, package in self._conanfile.dependencies.items():
for dep_require, dep_package in package.dependencies.items():
print(f"package {require.ref.name} depend on {dep_require.ref.name}")
Is this an error or is there some underlying assumption that I am not aware of. Maybe that all packages has a global default component [package_name]::[package_name]?
My question boils down to. When openssl depends on the component "zlib::zlib" how can I then resolve what package that belongs to?
Regards
Klaus
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
It references the component "zlib::zlib", but zlib does not expose such a compoent, only "ZLIB::ZLIB".
No, this is correct. The zlib::zlib is the way to reference to the zlib package, the whole package. It is not the same and not related to the CMake target name ZLIB::ZLIB. The .requires in cpp_info and components, refers always to packages and components names, not to CMake targets.
Is this an error or is there some underlying assumption that I am not aware of. Maybe that all packages has a global default component [package_name]::[package_name]?
yes, exactly that
My question boils down to. When openssl depends on the component "zlib::zlib" how can I then resolve what package that belongs to?
All cpp_info.requires and cpp_info.components[].requires always refers to either comp_name for dependencies to components in this same package or to pkg_name::component_name for other packages named pkg_name, with the special case of pkg_name::pkg_name being a name for the whole package.
The libcurl recipe in ConanCenter has just 1 component. This is due to legacy Conan 1.X generators reasons, where it was necessary to define one component to be able to define some custom target names. This wouldn't be really necessary with CMakeDeps, and the recipe could be simplified.
The behavior of CMakeDeps is that the component has priority. It doesn't matter much, because it is still an INTERFACE "abstract" target, not the real internal one.
Hello fellow conaneers!
I know that packages references dependencies at a package level, and that I can resolve the package dependencies in my custom generator:
I would like to do the same at a cpp_info level.
I see in the following in the openssl recipe:
https://github.com/conan-io/conan-center-index/blob/0c86693f18b14e52d7119b3e225706a002f27a9e/recipes/openssl/3.x.x/conanfile.py#L654
It references the component "zlib::zlib", but zlib does not expose such a compoent, only "ZLIB::ZLIB".
https://github.com/conan-io/conan-center-index/blob/0c86693f18b14e52d7119b3e225706a002f27a9e/recipes/zlib/all/conanfile.py#L101
Is this an error or is there some underlying assumption that I am not aware of. Maybe that all packages has a global default component [package_name]::[package_name]?
My question boils down to. When openssl depends on the component "zlib::zlib" how can I then resolve what package that belongs to?
Regards
Klaus
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: