meson-test/README.md

23 lines
1.5 KiB
Markdown

# Meson Example
![Static Badge](https://img.shields.io/badge/license-CeCILL_C-lightgrey)
![Static Badge](https://img.shields.io/badge/builds_on-Linux-brightgreen)
Here is an example of a meson configuration using external libraries such as [LibXML2](https://gitlab.gnome.org/GNOME/libxml2/) (Fully Meson-compatible) and [Poco](https://github.com/pocoproject/poco/) (Cmake subproject). For now it only builds on Linux and the prefered method is static linking because the output libraries name does not follow Poco CMake's standard. More on this can be addressed on the following issues:
- [Meson issue #14358](https://github.com/mesonbuild/meson/issues/14358/)
- [Meson issue #14359](https://github.com/mesonbuild/meson/issues/14359/)
- [Poco Discussion #4706](https://github.com/pocoproject/poco/discussions/4706/)
## Building
In the root directory launch the following:
```bash
meson build
cd build && meson compile
```
## Why Meson instead of CMake ?
[Meson](https://mesonbuild.com/) is a new build system that aims to be less **verbose** than _CMake_. It uses Ninja as its backend which might be faster than _make_. Meson is considered cross-platform and its only drawback for now is its compatibility with other projects.
Comparing this repo with the [cmake-fetch](https://git.etheryo.fr/Training/cmake-fetch/), we can see that for the same project we have way less configuration for the same result. _Meson_ should be used for newer project, and newer project should learn to comply with this build system which would be the future of cross compilation.