From 68da919f849b39a69158741a680bdcb5e585e4e3 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 1 Feb 2019 17:01:14 +0200 Subject: [PATCH] README: Meson for build Explain how to use with Meson, as autotools is going away. The instructions have been copied from https://wayland.freedesktop.org/building.html . Signed-off-by: Pekka Paalanen --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d62da517..7a6aec33 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,38 @@ to make code or non-technical contributions to Weston. Building Weston =============== -Weston is built using autotools, with `autogen.sh` and `make`. It often depends +Weston is built using [Meson](https://mesonbuild.com/). Weston often depends on the current release versions of [Wayland](https://gitlab.freedesktop.org/wayland/wayland) and [wayland-protocols](https://cgit.freedesktop.org/wayland/wayland-protocols). +If necessary, the latest Meson can be installed as a user with: + + $ pip3 install --user meson + +Weston's Meson build does not do autodetection and it defaults to all +features enabled, which means you likely hit missing dependencies on the first +try. If a dependency is avoidable through a build option, the error message +should tell you what option can be used to avoid it. You may need to disable +several features if you want to avoid certain dependencies. + + $ git clone https://gitlab.freedesktop.org/wayland/weston.git + $ cd weston + $ meson build/ --prefix=... + $ ninja -C build/ install + $ cd .. + +The `meson` command populates the build directory. This step can +fail due to missing dependencies. Any build options you want can be added on +that line, e.g. `meson build/ --prefix=... -Dsimple-dmabuf-drm=intel`. +All the build options can be found in the file +[meson_options.txt](meson_options.txt). + +Once the build directory has been successfully populated, you can inspect the +configuration with `meson configure build/`. If you need to change an +option, you can do e.g. +`meson configure build/ -Dsimple-dmabuf-drm=intel`. + Every push to the Weston master repository and its forks is built using GitLab CI. [Reading the configuration](.gitlab-ci.yml) may provide a useful example of how to build and install Weston.