Skip to content

meson: rework glut dependency handling

Erik Faye-Lund requested to merge kusma/mesa-demos:mingw-glut-pkg-config into main

The with-glut option approach has issues, where we can't pass the dependency we get from declare_dependency to cc.has_function(). This option was added to support the MinGW CI-build in the first place, but we can do better.

So let's switch to using a pkg-config wrapper-file, so we can use a normal meson-dependency for this. Then we mark the option as deprecated in case someone is using it, and move forward.

While we're at it, let's switch to a feature-option for GLUT, like we do for other dependencies. This allows us to ensure that GLUT is found on CI, and error out if not. Finally, we also fix the FreeGLUT detection, like is done in !90 (closed). But this time, we simply duplicate the logic for each case, so we can give them slightly different treatments to prevent breaking the CI builds.

Edited by Erik Faye-Lund

Merge request reports