[gtk+/wip/meson: 73/136] meson: gdk: wayland: move wayland bits into wayland subdir



commit 9a1b4dc7503f553d1595004bfbdc43ca81956749
Author: Tim-Philipp Müller <tim centricular com>
Date:   Mon Mar 20 00:36:38 2017 +0000

    meson: gdk: wayland: move wayland bits into wayland subdir

 gdk/meson.build                      |   59 +--------------------------------
 gdk/wayland/gdkeventsource-wayland.c |    1 +
 gdk/wayland/meson.build              |   50 ++++++++++++++++++++++++----
 3 files changed, 46 insertions(+), 64 deletions(-)
---
diff --git a/gdk/meson.build b/gdk/meson.build
index 0f8e4fd..aa30b5f 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -85,49 +85,6 @@ gdk_private_h_sources = files([
   'gdkseatdefaultprivate.h',
 ])
 
-
-gdk_wayland_sources = files([
-  'wayland/gdkapplaunchcontext-wayland.c',
-  'wayland/gdkcursor-wayland.c',
-  'wayland/gdkdevice-wayland.c',
-  'wayland/gdkdisplay-wayland.c',
-  'wayland/gdkdisplay-wayland.h',
-  'wayland/gdkdnd-wayland.c',
-  'wayland/gdkeventsource.c',
-  'wayland/gdkglcontext-wayland.c',
-  'wayland/gdkglcontext-wayland.h',
-  'wayland/gdkkeys-wayland.c',
-  'wayland/gdkmonitor-wayland.c',
-  'wayland/gdkmonitor-wayland.h',
-  'wayland/gdkscreen-wayland.c',
-  'wayland/gdkseat-wayland.h',
-  'wayland/gdkselection-wayland.c',
-  'wayland/gdkvulkancontext-wayland.c',
-  'wayland/gdkwayland.h',
-  'wayland/gdkwaylanddevice.h',
-  'wayland/gdkwaylanddisplay.h',
-  'wayland/gdkwaylandglcontext.h',
-  'wayland/gdkwaylandmonitor.h',
-  'wayland/gdkwaylandselection.h',
-  'wayland/gdkwaylandwindow.h',
-  'wayland/gdkwindow-wayland.c',
-  'wayland/wm-button-layout-translation.c',
-])
-
-gdk_wayland_public_headers = files([
-  'wayland/gdkwaylanddevice.h',
-  'wayland/gdkwaylanddisplay.h',
-  'wayland/gdkwaylandglcontext.h',
-  'wayland/gdkwaylandselection.h',
-  'wayland/gdkwaylandwindow.h'
-])
-
-gdk_wayland_private_sources = files([
-  'wayland/gdkprivate-wayland.h',
-])
-
-
-
 gdk_broadway_sources = files([
   'broadway/broadway-buffer.c',
   'broadway/broadway-buffer.h',
@@ -262,20 +219,8 @@ endif
 
 if wayland_enabled
   subdir('wayland')
-  gdk_deps += [
-    shmlib,
-    xkbdep,
-    wlclientdep,
-    wlprotocolsdep,
-    wlcursordep,
-    wlegldep
-  ]
-  gdk_sources += [
-    gdk_wayland_sources,
-    gdk_wayland_private_sources
-  ]
-
-  # install_headers(gdk_wayland_public_headers, subdir: 'gtk-3.0/gdk/wayland/')
+  gdk_deps += gdk_wayland_deps
+  gdk_sources += gdk_wayland_sources
 endif
 
 if broadway_enabled
diff --git a/gdk/wayland/gdkeventsource-wayland.c b/gdk/wayland/gdkeventsource-wayland.c
new file mode 100644
index 0000000..7d03f7f
--- /dev/null
+++ b/gdk/wayland/gdkeventsource-wayland.c
@@ -0,0 +1 @@
+#include "gdkeventsource.c"
diff --git a/gdk/wayland/meson.build b/gdk/wayland/meson.build
index 92f0386..5f4b1ba 100644
--- a/gdk/wayland/meson.build
+++ b/gdk/wayland/meson.build
@@ -1,3 +1,43 @@
+gdk_wayland_sources = files([
+  'gdkapplaunchcontext-wayland.c',
+  'gdkcursor-wayland.c',
+  'gdkdevice-wayland.c',
+  'gdkdisplay-wayland.c',
+  'gdkdnd-wayland.c',
+  'gdkeventsource-wayland.c',
+  'gdkglcontext-wayland.c',
+  'gdkkeys-wayland.c',
+  'gdkmonitor-wayland.c',
+  'gdkscreen-wayland.c',
+  'gdkselection-wayland.c',
+  'gdkvulkancontext-wayland.c',
+  'gdkwindow-wayland.c',
+  'wm-button-layout-translation.c',
+])
+
+gdk_wayland_public_headers = files([
+  'gdkwaylanddevice.h',
+  'gdkwaylanddisplay.h',
+  'gdkwaylandglcontext.h',
+  'gdkwaylandmonitor.h',
+  'gdkwaylandselection.h',
+  'gdkwaylandwindow.h'
+])
+
+install_headers(gdk_wayland_public_headers, subdir: 'gtk-4.0/gdk/wayland/')
+install_headers('gdkwayland.h', subdir: 'gtk-4.0/gdk/')
+
+gdk_wayland_deps = [
+  shmlib,
+  xkbdep,
+  wlclientdep,
+  wlprotocolsdep,
+  wlcursordep,
+  wlegldep,
+]
+
+# wayland protocols
+
 proto_dir = dependency('wayland-protocols').get_pkgconfig_variable('pkgdatadir')
 assert(proto_dir != '', 'Could not get pkgdatadir from wayland-protocols.pc')
 
@@ -24,22 +64,18 @@ proto_sources = [
    join_paths(proto_dir, 'unstable/tablet/tablet-unstable-v2.xml')],
 ]
 
-wayland_proto_targets = []
+# FIXME: there's some protostability/protoname stuff in Makefile.am I don't grok
 foreach p : proto_sources
   output_base = p[0]
   input = p[1]
 
-  hdr = custom_target('@0@ client header'.format(output_base),
+  gdk_wayland_sources += custom_target('@0@ client header'.format(output_base),
     input : input,
     output : '@0@-client-protocol.h'.format(output_base),
     command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'client-header'])
 
-  src = custom_target('@0@ source'.format(output_base),
+  gdk_wayland_sources += custom_target('@0@ source'.format(output_base),
     input : input,
     output : '@0@-protocol.c'.format(output_base),
     command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'code'])
-
-  wayland_proto_targets += [hdr, src]
 endforeach
-
-gdk_sources += wayland_proto_targets


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