[PATCH wayland-web 8/9] building: switch weston to meson

Pekka Paalanen ppaalanen at gmail.com
Sat Jan 12 12:52:07 UTC 2019


From: Pekka Paalanen <pq at iki.fi>

Use Meson in the guide, autotools is on its way out.

Signed-off-by: Pekka Paalanen <pq at iki.fi>
---
 building.html | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/building.html b/building.html
index 4f28f9e..61376d7 100644
--- a/building.html
+++ b/building.html
@@ -179,20 +179,37 @@ libinput docs</a> for instructions on how to build it.</p>
 available in the weston repo and comes with a few demo applications.
 </p>
 
+<p>Weston is built with <a href="https://mesonbuild.com/">Meson</a>. The last
+Weston release with autotools build system is probably the February/March 2019
+release. If necessary, the latest Meson can be installed as a user with:</p>
+<pre>
+$ pip3 install --user meson
+</pre>
+
+<p>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.</p>
+
 <pre>
 $ git clone <a href="https://gitlab.freedesktop.org/wayland/weston.git">https://gitlab.freedesktop.org/wayland/weston.git</a>
 $ cd weston
-$ ./autogen.sh --prefix=$WLD
-$ make
-$ sudo make install
+$ meson build/ --prefix=$WLD
+$ ninja -C build/ install
 $ cd ..
 </pre>
 
-<ul>
-<li>Use <code>--disable-setuid-install</code> to avoid having to
-use <code>sudo make install</code>. This is useful
-if you only plan to run weston under X.</li>
-</ul>
+<p>The <code>meson</code> 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. <code>meson build/ --prefix=$WLD -Dsimple-dmabuf-drm=intel</code>.
+All the build options can be found in the file
+<a href="https://gitlab.freedesktop.org/wayland/weston/blob/master/meson_options.txt"><code>meson_options.txt</code></a>.</p>
+
+<p>Once the build directory has been successfully populated, you can inspect the
+configuration with <code>meson configure build/</code>. If you need to change an
+option, you can do e.g.
+<code>meson configure build/ -Dsimple-dmabuf-drm=intel</code>.</p>
 
 <h2>Running Weston</h2>
 
-- 
2.20.1



More information about the wayland-devel mailing list