Conversation
|
Implementation idea taken from microsoft/vcpkg#30743 |
| "host": true | ||
| } | ||
| }, | ||
| "zlib-ng" |
There was a problem hiding this comment.
Don't forget to remove vcpkg-cmake and vcpkg-cmake-config.
There was a problem hiding this comment.
Thanks for catching that and the general technique!
There was a problem hiding this comment.
The show-stopper might be the lack of activating ZLIB_COMPAT. AFAICS it is not (and cannot be) mapped to a feature, and so it would need to be injected by triplet file customization.
There was a problem hiding this comment.
That's disappointing. The whole point of zlib-ng is to have a drop in replacement.
You have an example on how one would inject it?
There was a problem hiding this comment.
There was a problem hiding this comment.
"Drop-in replacement" is the same as "alternative", and vcpkg is unable to allow alternatives.
Basically, all (overlay) triplet files need
if(PORT STREQUAL "zlib-ng")
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DZLIB_COMPAT=ON")
endif()
(There are other efforts, but I don't think anything is ready now.)
There was a problem hiding this comment.
Alrighty so it seems like the port itself needs a change to make this work
if(ZLIB_COMPAT)
set(_cmake_dir "ZLIB")
else()
set(_port_suffix "zlib-ng")
endif()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${_cmake_dir})
Can wait until microsoft/vcpkg#43122 lands before proposing the changes.
1ff30c5 to
5cb0b7c
Compare
Remove the zlib port implementation and instead create an empty zlib port that depends on zlib-ng.
5cb0b7c to
8ad8dee
Compare
Remove the zlib port implementation and instead create an empty zlib port that depends on zlib-ng.