Setting Up Meson
Meson is an open source and multi-platform build system generator using Ninja as main backend. Build definitions are located in
meson.build files while build options are located in
Meson build support in Qt Creator is not mature yet, you can only use it to build native desktop applications. Many features available with Meson build or usually available from Qt Creator are missing.
Qt Creator automatically detects the Meson and Ninja executables specified in the
PATH. You can add paths to other Meson or Ninja executables and use them in different build and run kits.
Note: Meson build plugin is disabled by default, see Enabling and Disabling Plugins.
Qt Creator does not have strong requirements on Meson build's version, any version above 0.49.0 should be compatible.
To specify paths to Meson or Ninja executables:
- Select Tools > Options > Meson > Tools > Add.
- In the Name field, specify a name for the tool.
- In the Path field, specify the path to the Meson or Ninja executable.
- Select Apply to save your changes.
Select the Tools > Options > Kits > Kits tab to add the Meson and Ninja tools to a build and run kit:
For more information, see Adding Kits.
To open a meson.build file for editing, double-click it from project tree. Only plain text editor is available now.
Through external libraries, Qt Creator can support code completion and syntax highlighting as if they were part of the current project or the Qt library.
Qt Creator handles code completion from compilation flags in Meson introspection data. Any external library added with
dependency() or found in include path will be known by Qt Creator for code completion.
Syntax completion and highlighting work once your project configures successfully.
The following features are not supported yet:
- Cross compilation.
- Showing header files in project tree.
- Configuration change detection, for example when building triggers a Meson configuration first.
- Actions from locator such as searching or triggering builds.
- Adding files to Meson projects from Qt Creator.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.