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

build: Locate SDL by its case-sensitive name #4835

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Apr 7, 2025

The pkg-config file describing SDL's API is sdl2.pc or sdl3.pc, so the name to look for is sdl2 or sdl3. Looking for it with a different case combination will not necessarily work.

With the versions of pkg-config and meson in Steam Runtime 3 'sniper', it seems that SDL 2 can be found via either case combination, but SDL 3 requires the canonical case combination, sdl3.

The pkg-config file describing SDL's API is `sdl2.pc` or `sdl3.pc`,
so the name to look for is `sdl2` or `sdl3`. Looking for it with a
different case combination will not necessarily work.

With the versions of `pkg-config` and `meson` in Steam Runtime 3 'sniper',
it seems that SDL 2 can be found via either case combination, but SDL 3
requires the canonical case combination, `sdl3`.

Signed-off-by: Simon McVittie <smcv@collabora.com>
@doitsujin doitsujin merged commit c5c0169 into doitsujin:master Apr 7, 2025
4 checks passed
@smcv
Copy link
Contributor Author

smcv commented Apr 8, 2025

I believe SDL2 already worked because Meson has a special case for it (to be able to fall back to sdl2-config if sdl2.pc is not found), and Meson looks up dependency() special cases with their lower-cased names; but SDL3 no longer has sdl3-config so there is no similar special case.

@smcv
Copy link
Contributor Author

smcv commented Apr 8, 2025

Falling back from pkg-config to CMake might also have been case-insensitive, because CMake is generally case-insensitive.

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