The Meson build system

Meson is a modern and fast build system with a lot of features. You can find its documentation at 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.


sudo dnf install meson ninja-build


sudo apt install meson


sudo brew install meson


sudo pip install meson ninja


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:

cd builddir

Install with:

sudo ninja install


If you are in a build directory, meson configure shows you all available options.