Skip to content

Use libwebp pc module instead of libs#851

Open
dg0yt wants to merge 2 commits into
libgd:masterfrom
dg0yt:webp
Open

Use libwebp pc module instead of libs#851
dg0yt wants to merge 2 commits into
libgd:masterfrom
dg0yt:webp

Conversation

@dg0yt

@dg0yt dg0yt commented Oct 30, 2022

Copy link
Copy Markdown
Contributor

WebP now provides a pkg-config module.

@vapier

vapier commented Oct 30, 2022

Copy link
Copy Markdown
Member

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

@dg0yt

dg0yt commented Oct 30, 2022

Copy link
Copy Markdown
Contributor Author

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

vapier commented Oct 30, 2022

Copy link
Copy Markdown
Member

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

@dg0yt

dg0yt commented Oct 30, 2022

Copy link
Copy Markdown
Contributor Author

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

vapier commented Oct 30, 2022

Copy link
Copy Markdown
Member

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
@dg0yt

dg0yt commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Is this still the lower bound?

@vapier

vapier commented Jan 13, 2026

Copy link
Copy Markdown
Member

https://ubuntu.com/about/release-cycle

we can drop them both now. 16 goes fully EOL in a few months.

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