summaryrefslogtreecommitdiff
path: root/gdk/wayland/meson.build
blob: 85cac8bb042c4e6819bf36f81767fad89ce0061f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110


if wayland_enabled
  #TODO: This should come from pkg-config --variable=pkgdatadir wayland-protocols
  wayland_protocols_datadir = '/home/baedert/Source/gnome-configure/share/wayland-protocols/'
  wayland_scanner = find_program('wayland-scanner')
  genprotocols = find_program('genprotocolfiles.py')

  gtk_shell_h = custom_target(
    'gtk shell protocol header',
    input  : 'protocol/gtk-shell.xml',
    output : 'gtk-shell-client-protocol.h',
    command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'client-header']
  )

  gtk_shell_c = custom_target(
    'gtk shell protocol source',
    input  : 'protocol/gtk-shell.xml',
    output : 'gtk-shell-protocol.c',
    command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'code']
  )

  pointer_gestures_h = custom_target(
    'pointer gestures header',
    input  : wayland_protocols_datadir + 'unstable/pointer-gestures/pointer-gestures-unstable-v1.xml',
    output : 'pointer-gestures-unstable-v1-client-protocol.h',
    command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'client-header']
  )

  pointer_gestures_c = custom_target(
    'pointer gestures source',
    input  : wayland_protocols_datadir + 'unstable/pointer-gestures/pointer-gestures-unstable-v1.xml',
    output : 'pointer-gestures-unstable-v1-protocol.c',
    command: [genprotocols, wayland_scanner, '@INPUT@', '@OUTPUT@', 'code']
  )

  primary_selection_h = custom_target(
    'primary selection header',
    input  : 'protocol/gtk-primary-selection.xml',
    output : 'gtk-primary-selection-client-protocol.h',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
  )

  primary_selection_c = custom_target(
    'primary selection source',
    input  : 'protocol/gtk-primary-selection.xml',
    output : 'gtk-primary-selection-protocol.c',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
  )

  xdg_shell_h = custom_target(
    'xdg shell v6 header',
    input  : wayland_protocols_datadir + 'unstable/xdg-shell/xdg-shell-unstable-v6.xml',
    output : 'xdg-shell-unstable-v6-client-protocol.h',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
  )

  xdg_shell_c = custom_target(
    'xdg shell v6 source',
    input  : wayland_protocols_datadir + 'unstable/xdg-shell/xdg-shell-unstable-v6.xml',
    output : 'xdg-shell-unstable-v6-protocol.c',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
  )

  xdg_foreign_h = custom_target(
    'xdg foreign v1 header',
    input  : wayland_protocols_datadir + 'unstable/xdg-foreign/xdg-foreign-unstable-v1.xml',
    output : 'xdg-foreign-unstable-v1-client-protocol.h',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
  )

  xdg_foreign_c = custom_target(
    'xdg foreign v1 source',
    input  : wayland_protocols_datadir + 'unstable/xdg-foreign/xdg-foreign-unstable-v1.xml',
    output : 'xdg-foreign-unstable-v1-protocol.c',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
  )

  tablet_h = custom_target(
    'tablet v2 header',
    input  : wayland_protocols_datadir + 'unstable/tablet/tablet-unstable-v2.xml',
    output : 'tablet-unstable-v2-client-protocol.h',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'client-header']
  )

  tablet_c = custom_target(
    'tablet v2 source',
    input  : wayland_protocols_datadir + 'unstable/tablet/tablet-unstable-v2.xml',
    output : 'tablet-unstable-v2-protocol.c',
    command: [genprotocols, wayland_scanner,'@INPUT@', '@OUTPUT@', 'code']
  )



  gdk_sources += [
    gtk_shell_c,
    gtk_shell_h,
    pointer_gestures_h,
    pointer_gestures_c,
    primary_selection_h,
    primary_selection_c,
    xdg_shell_h,
    xdg_shell_c,
    xdg_foreign_h,
    xdg_foreign_c,
    tablet_h,
    tablet_c
  ]

endif