# Meson projects

> **TL;DR**
> Meson version: 0.54 or higher

In CLion, you can create, open, build, and run/debug [Meson](https://mesonbuild.com) projects. Meson support works on all platforms and for all local and [remote](remote-projects-support.html) toolchains, including [WSL](how-to-use-wsl-development-environment-in-product.html) and [Docker](clion-toolchains-in-docker.html).

Procedure: Install Meson

1. Follow the official [installation guide](https://mesonbuild.com/Getting-meson.html) to install Meson on your system.

Procedure: Create a Meson project

1. Select `File | New | Project` from the main menu or click New Project on the Welcome screen.

2. In the left-hand pane, select Meson.

3. Specify the project name and type, and select the language standard:

![Meson project wizard](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_wizard.png)

4. Click Create.

CLion will generate a simple project containing `main.cpp` and `meson.build`:

![A new Meson project](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_wizard_generated.png)

> **Tip:**
> You can adjust the `meson.build` file template in `Settings | Editor | File and Code Templates | Other`.
>
> ![The meson.build file templates](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_filetemplate.png)

Procedure: Open a Meson project

1. Select `File | Open` from the main menu or click Open on the Welcome screen.

2. Point CLion to the directory containing `meson.build` and click Open.

CLion will load the Meson project structure and show the results in the Build tool window:

![Meson project loaded](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_loadproject.png)

Procedure: Meson tool window

To open the Meson tool window, click ![](https://resources.jetbrains.com/help/img/idea/2026.2/clion-meson.icons.expui.toolWindowMeson.svg) on the right-hand toolbar or select `View | Tool Windows | Meson` from the main menu.

In this window, you can find the list of build targets, and useful commands, like `clean`, `install`, `test`, `configure`, and others:

![Meson tool window](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_toolwindow.png)

Double-click on a command or target to run it. The tooptip on hover will show the exact command that will be applied:

![Meson tool window tooltips](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_tw_tooltip.png)

Use the toolbar to perform project actions and quickly access the [project
settings](#configure-meson):

![Meson window toolbar](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_toolwindow_toolbar.png)

Procedure: Meson project settings

1. Go to `Settings | Build, Execution, Deployment | Meson` or click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.settings.svg) in the Meson tool window.

2. Use this dialog to configure the following:

* Toolchain — select one the configured [toolchains](how-to-create-toolchain-in-clion.html).

* Meson executable — specify a custom Meson executable, if required.

* Setup options — use this field for additional Meson commands, such as `--native-file`.

* Build directory — check or change the build directory.

* Build options — provide additional build options, if required.

![Meson settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_settings.png)

Procedure: Edit meson.build with assistance

* CLion highlights the code in `meson.build` scripts. To adjust the color scheme, go to `Settings | Editor | Color Scheme | Meson`.

![Highlighting in meson.build](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_hightlight.png)

* You can use the [Structure view](file-structure.html) to navigate to targets, dependencies, and option commands in `meson.build` and `meson_options.txt`.

Press `Alt+7` (Windows), `⌘ 7` (macOS), `⌘ 7` (IntelliJ IDEA Classic (macOS)), `⌘ 7` (macOS System Shortcuts), `Alt+7` (XWin), `Alt+7` (GNOME), `Alt+7` (KDE), `Alt+7` (Emacs), `Alt+7` (Sublime Text), `⌘ 7` (Sublime Text (macOS)), `⌘ 3` (Xcode), `Ctrl+Alt+F` (Visual Studio), `⌃ ⌥ F` (Visual Studio (macOS)), `Ctrl+F11` (ReSharper), `⌃ F11` (ReSharper (macOS)), `Alt+7` (QtCreator), `⌘ 7` (QtCreator (macOS)), `Ctrl+7` (NetBeans), `Alt+7` (Eclipse), `⌘ 7` (Eclipse (macOS)) to open the Structure tool window or `Ctrl+F12` (Windows), `⌘ F12` (macOS), `⌘ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ 7` (macOS System Shortcuts), `Ctrl+F12` (XWin), `Ctrl+F12` (GNOME), `Ctrl+0` (KDE), `Ctrl+F12` (Emacs), `Ctrl+R` (Sublime Text), `⌘ R` (Sublime Text (macOS)), `⌃ 6` (Xcode), `Alt+\` (Visual Studio), `⌥ \` (Visual Studio (macOS)), `Ctrl+F12` (ReSharper), `⌘ F12` (ReSharper (macOS)), `Ctrl+F12` (QtCreator), `⌘ F12` (QtCreator (macOS)), `Ctrl+F12` (NetBeans), `Ctrl+F3` (Eclipse), `⌘ O` (Eclipse (macOS)) to open the Structure popup.

![Meson.build file structure](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_structure.png)

Procedure: Reload the project

* When you make changes in `meson.build`, CLion shows an icon suggesting to reload the project:

![Reload project icon](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_reloadicon.png)

Click the icon or press the shortcut.

> **Tip:**
> You can adjust the color scheme for Meson files in `Settings | Editor | Color Scheme | Meson`.

* Alternatively, click ![](https://resources.jetbrains.com/help/img/idea/2026.2/clion-meson-plugin.icons.expui.mesonReload.svg) in the Meson tool window.

Another option is to use the Tools | Meson menu:

![Meson menu actions](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_menuactions.png)

Select Wipe and reload Meson Project to perform a [wipe](https://mesonbuild.com/Commands.html) before reload.

> **Tip:**
> From this menu, you can also [Change project root](change-project-root-directory.html).

Procedure: Run/debug configurations for Meson

* CLion detects the project build targets and creates the Native Application configurations for them:

![Meson project configurations](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_configs.png)

* In the main menu, go to `Run | Edit Configurations` to set up additional parameters if required:

![Native Application configurations for Meson](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_configs_editconfigs.png)

Procedure: Build, run, and debug

* Use the actions in the `Build` menu to build the project or the selected configuration.

![The Build menu](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_buildactions.png)

> **Tip:**
> Learn more in [Build actions](build-actions.html).

* To run or debug your program, you can use the configuration widget (click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.run.run.svg) or ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.run.debug.svg)), the `Run` menu, or the gutter icons next to the program's entry point:

![Gutter icon for run/debug](https://resources.jetbrains.com/help/img/idea/2026.2/cl_meson_guttericon.png)

Refer to [Run applications](running-applications.html) and [Debug](debugging-code.html) for more information.

## See also

### Concepts

[Project formats](project-models.html) [Run/debug configurations](run-debug-configuration.html)

### How tos

[Editor basics](using-code-editor.html) [File structure](file-structure.html) [Build actions](build-actions.html) [Run applications](running-applications.html) [Debug](debugging-code.html)

