User avatar
mia (developer mode)
@mia@shrimptest.0x0.st
@yew meson has a far more robust and easier way to use project dependencies than any other build system i have used.

in this particular case, it has first-class support for finding the right way to use GL on multiple platforms, and will try pkg-config and user-provided config if that does not work.
declaring the dependency here is as simple as adding
dependency('gl') to the build target’s dependency list. making it optional is also trivial, by adding a feature-type option to meson_options.txt.
with autotools, the same is extremely verbose and ugly, and i wouldn’t be able to implement it in a somewhat robust way without quadruple-checking the documentation

(i’m not saying meson’s GL detection is perfect though, because i’m aware that using GL is such a highly platform-dependent affair from generated headers to snowflake windowing systems and compatibility layers like ANGLE that need to be special-cased)

in general, the wrap system allows projects to bundle dependencies that the target platform does not provide (downloaded and patched as necessary), while also allowing distro packagers to prefer or enforce using system packages.

meson tries to provide a universal abstraction for dependency declaration and discovery, with special cases where necessary (as with for example highly modular frameworks like Qt). it will call out to cmake if it has to, but attempts to do this in a way that is transparent to the user.

as a distro packager i really really appreciate the way it works, and how for example it allows switching from “just build the thing” to “i want everything as explicitly defined and reproducible as possible, please don’t make me read the entire build log every time something changes to make sure it’s still doing what i want”