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

Use libwebp pc module instead of libs #851

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Oct 30, 2022

WebP now provides a pkg-config module.

@vapier
Copy link
Member

vapier commented Oct 30, 2022

what version of libwebp though? we've been supporting older versions that distros are shipping.

@dg0yt
Copy link
Contributor Author

dg0yt commented Oct 30, 2022

what version of libwebp though? we've been supporting older versions that distros are shipping.

It works with 1.2.4 in vcpkg. IIRC webp in Ubuntu 18.04 is too old. webp added pkg-config support 4 years ago with 1.0.1:
webmproject/libwebp@eee00b6

If you want to retain compatibility with old versions of webp, a pkg_check_modules might be added to FindWEBP.cmake. (And vcpkg uses pkg-config even with MSVC.)

@vapier
Copy link
Member

vapier commented Oct 30, 2022

our Autotools build already checks pkg-config and supports webp 0.2.0+. so cmake should be comparable.

@dg0yt
Copy link
Contributor Author

dg0yt commented Oct 30, 2022

IIRC webp in Ubuntu 18.04 is too old.

I was wrong, even Ubunto 18.04 has it, as well as older Debian packages (0.6.1).

@vapier
Copy link
Member

vapier commented Oct 30, 2022

i'll note that Ubuntu 16 & 14 LTS are still supported & actively used

the autotools generated .pc DTRT when it comes to finding libs via pkg-config or direct probing, and then generating the corresponding gd pc file

the current cmake/modules/FindWEBP.cmake only tests direct linkage ... it needs to check via PkgConfig first, and if that works, then we can add the result to PKG_REQUIRES_PRIVATES.

@dg0yt dg0yt mentioned this pull request Nov 28, 2023
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.

None yet

2 participants