The Meson Build System http://mesonbuild.com
  • Python 80.3%
  • Meson 11.9%
  • C 3.7%
  • Shell 1%
  • C++ 1%
  • Other 1.7%
Find a file
Paolo Bonzini 782cf324ce compilers: add /permissive to cl/clang-cl compiler checks
Match what GNU-like compiler does, helping with c++NN std.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-09-11 07:13:06 +02:00
.github ci: Disable git repository ownership checks 2026-06-22 08:47:32 -07:00
ci Add libclang-rt-dev to ubuntu-rolling 2026-08-28 04:56:03 +01:00
cross compilers: add support for SDCC 2026-09-08 12:05:55 +02:00
data interpreter: Add a default() function 2026-07-04 19:04:10 +02:00
docs cargo: implement workspace.exclude 2026-09-10 10:35:37 +02:00
graphics Document the color used in the logo. 2023-10-06 13:09:53 +03:00
man Bump version number for rc3. 2026-08-04 18:56:32 +03:00
manual tests interpreter: Handle BuildTarget.vala_args as Files in the interpreter 2023-10-09 17:33:48 -04:00
mesonbuild compilers: add /permissive to cl/clang-cl compiler checks 2026-09-11 07:13:06 +02:00
packaging Set the encoding parameter for all open() calls that write in text mode 2026-05-01 11:18:47 -04:00
test cases cargo: add tests for nested workspaces 2026-09-10 10:35:37 +02:00
tools Condense test directory names for 1.9. 2025-08-01 16:52:03 +03:00
unittests unittests: Use TestCase.fail instead of .assertTrue(False) 2026-09-11 01:06:00 +02:00
.editorconfig editorconfig settings: attempt to guarantee the final end-of-line char 2021-09-20 17:54:19 -04:00
.flake8 modules/cuda: completely revamp microarchitecture handling 2026-08-11 16:53:14 +01:00
.gitattributes Mark the bash completion files for bash and zsh as Shell files 2024-02-09 22:26:46 +05:30
.gitignore wrap: Lock subproject directory when downloading wraps 2025-06-03 15:43:58 +03:00
.mailmap Update email address in .mailmap. 2025-05-20 11:40:15 -04:00
.mypy.ini mypy: list all strict_optional=False modules 2026-09-10 19:28:22 +02:00
.pylintrc pylint: disable too-many-positional-arguments 2024-09-20 15:43:26 -07:00
AGENTS.md AGENTS.md: Add based on GStreamer 2026-09-01 14:19:33 -07:00
azure-pipelines.yml ci/windows: Use Python 3.10 2026-04-23 14:01:23 -07:00
CLAUDE.md AGENTS.md: Add based on GStreamer 2026-09-01 14:19:33 -07:00
CODEOWNERS modules/wayland: Add unstable_wayland module 2022-02-27 14:33:33 -05:00
contributing.md Readme fixes. [skip ci] 2019-06-06 21:54:50 +03:00
COPYING Start of project. 2012-12-23 16:35:35 +02:00
GEMINI.md AGENTS.md: Add based on GStreamer 2026-09-01 14:19:33 -07:00
MANIFEST.in remove outdated reference to deleted files in setuptools packaging 2022-02-16 18:19:13 -05:00
meson.py Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
pyproject.toml Do not require wheel for building 2026-01-05 17:56:07 -05:00
README.md Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
run_cross_test.py Use SPDX-License-Identifier consistently 2023-12-13 15:19:21 -05:00
run_format_tests.py minstall: Treat symlinks to directories as directories if follow_symlinks is enabled in do_copydir() 2026-09-08 08:06:55 +02:00
run_meson_command_tests.py Set the encoding parameter for all open() calls that write in text mode 2026-05-01 11:18:47 -04:00
run_mypy.py simplify run_mypy.py 2026-06-04 09:31:07 +02:00
run_project_tests.py meson-test-run.xml: Always attach output to testcase node 2026-05-14 17:36:27 +02:00
run_shell_checks.py ci: Drop ubuntu bionic 2026-04-23 14:01:23 -07:00
run_single_test.py run_project_tests: Plumb test category name down into TestDef 2026-03-16 18:38:22 +01:00
run_tests.py environment, build: store which machines are in use 2026-06-17 13:05:22 -07:00
run_unittests.py Split only at first equal sign more often 2026-03-04 12:54:20 +01:00
setup.cfg Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
setup.py Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
skip_ci.py Use SPDX-License-Identifier consistently 2023-12-13 15:19:21 -05:00

Meson® is a project to create the best possible next-generation build system.

Status

PyPI Build Status Codecov

Dependencies

  • Python (version 3.10 or newer)
  • Ninja (version 1.8.2 or newer)

Latest Meson version supporting previous Python versions:

  • Python 3.9: 1.11
  • Python 3.8: 1.11
  • Python 3.7: 1.11
  • Python 3.6: 0.61.5
  • Python 3.5: 0.56.2
  • Python 3.4: 0.45.1

Installing from source

Meson is available on PyPI, so it can be installed with pip3 install meson. The exact command to type to install with pip can vary between systems, be sure to use the Python 3 version of pip.

If you wish you can install it locally with the standard Python command:

python3 -m pip install meson

For builds using Ninja, Ninja can be downloaded directly from Ninja GitHub release page or via PyPI

python3 -m pip install ninja

More on Installing Meson build can be found at the getting meson page.

Creating a standalone script

Meson can be run as a Python zip app. To generate the executable run the following command:

./packaging/create_zipapp.py --outfile meson.pyz --interpreter '/usr/bin/env python3' <source checkout>

Running

Meson requires that you have a source directory and a build directory and that these two are different. In your source root must exist a file called meson.build. To generate the build system run this command:

meson setup <source directory> <build directory>

Depending on how you obtained Meson the command might also be called meson.py instead of plain meson. In the rest of this document we are going to use the latter form.

You can omit either of the two directories, and Meson will substitute the current directory and autodetect what you mean. This allows you to do things like this:

cd <source root>
meson setup builddir

To compile, cd into your build directory and type ninja. To run unit tests, type ninja test.

More on running Meson build system commands can be found at the running meson page or by typing meson --help.

Contributing

We love code contributions. See the contribution page on the website for details.

IRC

The channel to use is #mesonbuild either via Matrix (web interface) or OFTC IRC.

Further info

More information about the Meson build system can be found at the project's home page.

Meson is a registered trademark of Jussi Pakkanen.