[Spice-devel] [PATCH v2] meson: Allow building on a Wayland-only environment

Fabio Estevam festevam at gmail.com
Tue Oct 11 10:18:37 UTC 2022


From: Fabio Estevam <festevam at denx.de>

Currently, it is not possible to build spice-gtk on a Wayland-only
environment due to the x11 dependency in meson.

Since commit a7381b0864b7 ("Allow to build without X11 gdk backend)
it is possible to build spice-gtk without X11 GDK backend, so make
the x11 dependency in meson optional.

Signed-off-by: Fabio Estevam <festevam at denx.de>
---
Changes since v1:
- Make the x11 dependency optional instead of removing it (Frediano).

 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index dd46294085b0..c163a44f2d60 100644
--- a/meson.build
+++ b/meson.build
@@ -152,7 +152,10 @@ if d.found()
   spice_gtk_deps += d
   if host_machine.system() != 'windows'
     spice_gtk_deps += dependency('epoxy')
-    spice_gtk_deps += dependency('x11')
+    d = dependency('x11', required: false)
+    if d.found()
+      spice_gtk_deps += d
+    endif
     d = dependency('libva-x11', required: false)
     if d.found()
       spice_gtk_deps += d
-- 
2.25.1



More information about the Spice-devel mailing list