Open Nekto89 opened 1 year ago
There is no proper approach currently, the only one would be to create a virtual package, but it's still unclear how such recipe should look like: https://github.com/conan-io/conan/issues/12374
Current (horrible) approach is to add an option in all recipes having such dependency (like we do sometimes for libjpeg & libjpeg-turbo), but it's a terrible user experience because there is not one source of truth to guarantee consistent dependency graph.
Moreover it's not because you expose zlib-ng instead of zlib that build systems will be able to find & inject zlib-ng automagically (zlib-ng recipe doesn't generate FindZLIB.cmake for example, but it could be fixed when zlib_compat option is enabled).
@SpaceIm new version of ITK (5.3.0) will contain zlib-ng instead of zlib. This might bring a lot of conflicts because ITK depends on other libraries that use pure zlib
@SpaceIm Should this be added to zlib-ng recipe in CCI under compatibility option (copied from zlib recipe)? And also probably provides = "zlib"?
self.cpp_info.set_property("cmake_find_mode", "both")
self.cpp_info.set_property("cmake_file_name", "ZLIB")
self.cpp_info.set_property("cmake_target_name", "ZLIB::ZLIB")
self.cpp_info.set_property("pkg_config_name", "zlib")
self.cpp_info.names["cmake_find_package"] = "ZLIB"
self.cpp_info.names["cmake_find_package_multi"] = "ZLIB"
@SpaceIm Should this be added to zlib-ng recipe in CCI under compatibility option (copied from zlib recipe)? And also probably provides = "zlib"?
self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("cmake_file_name", "ZLIB") self.cpp_info.set_property("cmake_target_name", "ZLIB::ZLIB") self.cpp_info.set_property("pkg_config_name", "zlib") self.cpp_info.names["cmake_find_package"] = "ZLIB" self.cpp_info.names["cmake_find_package_multi"] = "ZLIB"
Added here: #19476
I'm curious what is the proper approach for replacing zlib with zlib-ng? zlib-ng can provide compatible API and theoretically be used everywhere instead of zlib. Should all recipes that depend on zlib have option for choosing zlib/zlib-ng?