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

This commit is contained in:
Tim-Philipp Müller
2017-03-20 00:36:38 +00:00
committed by Emmanuele Bassi
parent 4b969b1b40
commit d4881df0d8
3 changed files with 46 additions and 64 deletions

View File

@@ -84,49 +84,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',
@@ -261,20 +218,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

View File

@@ -0,0 +1 @@
#include "gdkeventsource.c"

View File

@@ -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