Description
CMake 4 recently removed compatibility with CMake projects targeted at CMake < 3.5, and as it happens the version of SDL that Rust-SDL2 points at is targeted at CMake 3.0:
https://github.com/libsdl-org/SDL/blob/07d0f51fa292895443f563f0cbde4cb3802d87fa/CMakeLists.txt#L5
Thankfully, a version of SDL2 (branch 2.30.x) was eventually released with CMake 3.10 as a minimum requirement, which should make it work with modern versions of CMake:
https://github.com/libsdl-org/SDL/blob/release-2.30.x/CMakeLists.txt#L8
Simply doing checkout tags/release-2.30.12
seems to work (compiles), but at least one test fails:
failures:
---- pixels::test_pixel_format_enum stdout ----
thread 'pixels::test_pixel_format_enum' panicked at src/sdl2/pixels.rs:574:13:
assertion `left == right` failed
left: RGB888
right: YUY2
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Not sure if any mainstream distros are already shipping CMake 4, but at least Arch already is so it probably won't be long before this breaks Debian/Ubuntu/etc.