The Meson build system
Meson is a modern and fast build system with a lot of features. You can find its documentation at mesonbuild.com. Meson is written in Python. Meson has different backends (Ninja, VS*, Xcode, …).
Installing Meson and Ninja
The best maintained backend of Meson is Ninja. Installing both can be done with your distribution's package manager, with PIP, Homebrew, etc. The version for your user and your superuser has to be the same.
Fedora
Debian/Ubuntu
macOS:
PIP:
Build
Meson builds in a separate directory. It doesn't touch anything of your project. This way you can have seperate debug and release build directories for example.
Prepare your build directory:
meson builddir # defaults to debug build ## Additional build directories meson --buildtype release build_release # release build meson --buildtype debugoptimized build_debug # optimized debug build ```
Now build with Ninja:
Install with:
Configuration
If you are in a build directory, meson configure shows you all available options.