2020-01-24 18:33:13 +00:00
|
|
|
subdir('cursor')
|
|
|
|
|
2017-03-20 00:36:38 +00:00
|
|
|
gdk_wayland_sources = files([
|
|
|
|
'gdkapplaunchcontext-wayland.c',
|
2018-04-12 14:48:31 +00:00
|
|
|
'gdkcairocontext-wayland.c',
|
2017-12-02 20:54:36 +00:00
|
|
|
'gdkclipboard-wayland.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'gdkcursor-wayland.c',
|
|
|
|
'gdkdevice-wayland.c',
|
|
|
|
'gdkdisplay-wayland.c',
|
2018-07-04 07:28:43 +00:00
|
|
|
'gdkdrag-wayland.c',
|
2018-05-30 02:04:51 +00:00
|
|
|
'gdkdrop-wayland.c',
|
2017-03-20 00:37:09 +00:00
|
|
|
'gdkeventsource.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'gdkglcontext-wayland.c',
|
|
|
|
'gdkkeys-wayland.c',
|
|
|
|
'gdkmonitor-wayland.c',
|
2017-12-03 04:39:08 +00:00
|
|
|
'gdkprimary-wayland.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'gdkvulkancontext-wayland.c',
|
2018-03-20 10:46:11 +00:00
|
|
|
'gdksurface-wayland.c',
|
2017-03-20 00:36:38 +00:00
|
|
|
'wm-button-layout-translation.c',
|
|
|
|
])
|
|
|
|
|
|
|
|
gdk_wayland_public_headers = files([
|
|
|
|
'gdkwaylanddevice.h',
|
|
|
|
'gdkwaylanddisplay.h',
|
|
|
|
'gdkwaylandglcontext.h',
|
|
|
|
'gdkwaylandmonitor.h',
|
2018-03-20 10:46:11 +00:00
|
|
|
'gdkwaylandsurface.h'
|
2017-03-20 00:36:38 +00:00
|
|
|
])
|
|
|
|
|
2019-05-06 18:09:03 +00:00
|
|
|
install_headers(gdk_wayland_public_headers, 'gdkwayland.h', subdir: 'gtk-4.0/gdk/wayland/')
|
2017-03-20 00:36:38 +00:00
|
|
|
|
|
|
|
gdk_wayland_deps = [
|
|
|
|
shmlib,
|
|
|
|
xkbdep,
|
|
|
|
wlclientdep,
|
|
|
|
wlprotocolsdep,
|
|
|
|
wlegldep,
|
|
|
|
]
|
|
|
|
|
2017-03-19 20:50:58 +00:00
|
|
|
wayland_scanner = find_program('wayland-scanner')
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-04-26 14:16:21 +00:00
|
|
|
# Format:
|
|
|
|
# - protocol name
|
2017-12-18 12:00:36 +00:00
|
|
|
# - protocol stability ('private', 'stable' or 'unstable')
|
2017-04-26 14:16:21 +00:00
|
|
|
# - protocol version (if stability is 'unstable')
|
2017-03-19 20:50:58 +00:00
|
|
|
proto_sources = [
|
2017-12-18 12:00:36 +00:00
|
|
|
['gtk-shell', 'private', ],
|
|
|
|
['gtk-primary-selection', 'private', ],
|
2017-04-26 14:16:21 +00:00
|
|
|
['pointer-gestures', 'unstable', 'v1', ],
|
|
|
|
['xdg-shell', 'unstable', 'v6', ],
|
2017-12-18 12:00:36 +00:00
|
|
|
['xdg-shell', 'stable', ],
|
2017-04-26 14:16:21 +00:00
|
|
|
['xdg-foreign', 'unstable', 'v1', ],
|
|
|
|
['tablet', 'unstable', 'v2', ],
|
2017-04-29 00:35:51 +00:00
|
|
|
['keyboard-shortcuts-inhibit', 'unstable', 'v1', ],
|
2017-12-18 12:00:36 +00:00
|
|
|
['server-decoration', 'private' ],
|
2019-04-15 14:42:45 +00:00
|
|
|
['xdg-output', 'unstable', 'v1', ],
|
2017-03-19 20:50:58 +00:00
|
|
|
]
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-03-20 11:44:42 +00:00
|
|
|
gdk_wayland_gen_headers = []
|
|
|
|
|
2017-04-26 14:16:21 +00:00
|
|
|
foreach p: proto_sources
|
|
|
|
proto_name = p.get(0)
|
|
|
|
proto_stability = p.get(1)
|
|
|
|
|
|
|
|
if proto_stability == 'stable'
|
2017-12-18 12:00:36 +00:00
|
|
|
output_base = proto_name
|
2020-02-16 19:09:42 +00:00
|
|
|
input = files(join_paths(wlproto_dir, '@0@/@1@/@2@.xml'.format(proto_stability, proto_name, output_base)))
|
2017-12-18 12:00:36 +00:00
|
|
|
elif proto_stability == 'private'
|
2017-04-26 14:16:21 +00:00
|
|
|
output_base = proto_name
|
2020-02-16 19:09:42 +00:00
|
|
|
input = files('protocol/@0@.xml'.format(proto_name))
|
2017-04-26 14:16:21 +00:00
|
|
|
else
|
|
|
|
proto_version = p.get(2)
|
|
|
|
output_base = '@0@-@1@-@2@'.format(proto_name, proto_stability, proto_version)
|
2020-02-16 19:09:42 +00:00
|
|
|
input = files(join_paths(wlproto_dir, '@0@/@1@/@2@.xml'.format(proto_stability, proto_name, output_base)))
|
2017-04-26 14:16:21 +00:00
|
|
|
endif
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-03-20 11:44:42 +00:00
|
|
|
gdk_wayland_gen_headers += custom_target('@0@ client header'.format(output_base),
|
2017-04-26 14:16:21 +00:00
|
|
|
input: input,
|
|
|
|
output: '@0@-client-protocol.h'.format(output_base),
|
|
|
|
command: [
|
|
|
|
wayland_scanner,
|
|
|
|
'client-header',
|
2018-04-11 13:37:57 +00:00
|
|
|
'@INPUT@', '@OUTPUT@',
|
2017-04-26 14:16:21 +00:00
|
|
|
])
|
2016-09-10 18:40:02 +00:00
|
|
|
|
2017-03-20 00:36:38 +00:00
|
|
|
gdk_wayland_sources += custom_target('@0@ source'.format(output_base),
|
2017-04-26 14:16:21 +00:00
|
|
|
input: input,
|
|
|
|
output: '@0@-protocol.c'.format(output_base),
|
|
|
|
command: [
|
|
|
|
wayland_scanner,
|
2018-04-11 13:37:57 +00:00
|
|
|
'private-code',
|
2017-04-26 14:16:21 +00:00
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
])
|
2017-03-19 20:50:58 +00:00
|
|
|
endforeach
|
2017-03-20 00:37:09 +00:00
|
|
|
|
2017-03-30 23:15:08 +00:00
|
|
|
libgdk_wayland = static_library('gdk-wayland',
|
2017-04-26 14:16:21 +00:00
|
|
|
gdk_wayland_sources, gdk_wayland_gen_headers, gdkconfig, gdkenum_h,
|
|
|
|
include_directories: [ confinc, gdkinc, ],
|
|
|
|
c_args: [
|
2019-11-27 13:33:43 +00:00
|
|
|
'-DGTK_COMPILATION',
|
2017-04-26 14:16:21 +00:00
|
|
|
'-DG_LOG_DOMAIN="Gdk"',
|
2017-04-28 21:26:32 +00:00
|
|
|
] + common_cflags,
|
|
|
|
link_args: common_ldflags,
|
2020-01-24 18:33:13 +00:00
|
|
|
link_with: [libwayland_cursor, ],
|
|
|
|
dependencies: [ gdk_deps, gdk_wayland_deps])
|