[gnome-settings-daemon: 2/3] build: Fix build when wayland support is disabled



commit 51088a9c27d713bbe63359b865603c833eb5a930
Author: Marvin Schmidt <marv exherbo org>
Date:   Fri Jun 22 20:12:50 2018 +0200

    build: Fix build when wayland support is disabled
    
    The udev based device manager used for wayland environments was built
    based on the state of the gudev option instead of the wayland option.
    This resulted in an build error when building with `-Dwayland=false`
    since the gdk/gdkwayland.h header file is not present on systems without
    gdk-wayland-3.0.
    
    This patch puts the compilation of the udev based device manager behind
    the wayland option and the gdk-wayland-3.0 dependency

 meson.build                | 3 ++-
 plugins/common/meson.build | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 785094dd..247d1718 100644
--- a/meson.build
+++ b/meson.build
@@ -125,11 +125,12 @@ if enable_gudev
 endif
 config_h.set10('HAVE_GUDEV', enable_gudev)
 
-# Check for libwayland-client
+# Check for wayland dependencies
 enable_wayland = get_option('wayland')
 if enable_wayland
   assert(enable_gudev, 'GUDev support is required for wayland support.')
   wayland_client_dep = dependency('wayland-client')
+  wayland_gdk_dep = dependency('gdk-wayland-3.0')
 endif
 config_h.set10('HAVE_WAYLAND', enable_wayland)
 
diff --git a/plugins/common/meson.build b/plugins/common/meson.build
index 65a0757c..6bda2d2a 100644
--- a/plugins/common/meson.build
+++ b/plugins/common/meson.build
@@ -42,10 +42,10 @@ if host_is_darwin
   ldflags += ['-Wl,-bundle_loader,@0@'.format(join_paths(), meson.build_root(), meson.project_name(), 
meson.project_name())]
 endif
 
-if enable_gudev
+if enable_wayland
   sources += files('gsd-device-manager-udev.c')
 
-  deps += gudev_dep
+  deps += [wayland_gdk_dep, gudev_dep]
 endif
 
 if enable_wacom


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]