Skip to content
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

Allow using vcpkg for all Windows targets, and use find_package #136

Merged
merged 2 commits into from
Jul 23, 2023

Conversation

micolous
Copy link
Contributor

@micolous micolous commented Jun 27, 2023

vcpkg-rs doesn't support -pc-windows-gnu (mingw) yet, but its integration tests will try to build libz-sys, which currently prevents using vcpkg for non-msvc targets.

This change should have no effect for libz-sys right now, but unblocks that work.

This also switches from vcpkg::lib_names/probe to vcpkg::find_package, which reliably gets the library names. Previously, this had hard coded assumptions using MSVC-style library naming (no lib prefix).

Addendum to release notes: vcpkg won't work for non-MSVC Windows targets until mcgoo/vcpkg-rs#52 is merged and there's a release of vcpkg-rs with that PR.

@micolous micolous changed the title Allow using vcpkg for all Windows targets Allow using vcpkg for all Windows targets, and use find_package Jun 28, 2023
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for tackling this!

To me this looks like an improvement all around as it reduces special cases that, at least according to CI, aren't needed (anymore).

I'd merge this, but would like another reviewer for good measure.

@Byron Byron requested a review from joshtriplett June 28, 2023 06:13
@Byron
Copy link
Member

Byron commented Jul 23, 2023

I have rebased this PR onto main which contains additional tests against flate2 which gives me all the confidence I need to merge this PR once CI is green.

@Byron Byron merged commit 708f738 into rust-lang:main Jul 23, 2023
43 checks passed
@micolous
Copy link
Contributor Author

Thanks!

One addendum to the release notes for v1.1.10: this won't actually build for non-MSVC targets until mcgoo/vcpkg-rs#52 is merged, and there's a new release of vcpkg-rs with it.

This PR just lays some of the ground work, and a release means I won't have to pin libz-sys in vcpkg-rs' CI any more 🎉

@Byron
Copy link
Member

Byron commented Jul 25, 2023

Thanks for the clarification! I added the amendment to the release notes, and am looking forward to seeing the vcpkg-rs improvements merged. Thanks for driving this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants