-
Notifications
You must be signed in to change notification settings - Fork 17
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
Map zlib to zlib-ng #208
Map zlib to zlib-ng #208
Conversation
Implementation idea taken from microsoft/vcpkg#30743 |
@@ -12,6 +12,7 @@ | |||
{ | |||
"name": "vcpkg-cmake-config", | |||
"host": true | |||
} | |||
}, | |||
"zlib-ng" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to remove vcpkg-cmake and vcpkg-cmake-config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that and the general technique!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.