360c4259463bc5cf01c0d20ca1feb6b1271c4578
[platform/core/uifw/libds-tizen.git] / src / clients / meson.build
1 wayland_tbm_client = dependency('wayland-tbm-client', required: false)
2 libtbm = dependency('libtbm', required: false)
3
4 if not wayland_tbm_client.found() or not libtbm.found()
5   subdir_done()
6 endif
7
8 simple_tbm_files = ['simple-tbm.c']
9 simple_tbm_deps = [
10   dependency('wayland-client', required: true),
11   wayland_tbm_client,
12   libtbm,
13 ]
14
15 protocols = {
16   'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
17 }
18
19 protocols_code = {}
20 protocols_client_header = {}
21 foreach name, path : protocols
22   code = custom_target(
23     name.underscorify() + '_c',
24     input: path,
25     output: '@BASENAME@-protocol.c',
26     command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
27     )
28   simple_tbm_files += code
29
30   client_header = custom_target(
31     name.underscorify() + '_client_h',
32     input: path,
33     output: '@BASENAME@-client-protocol.h',
34     command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
35     build_by_default: false,
36   )
37   simple_tbm_files += client_header
38 endforeach
39
40 executable('ds-simple-tbm',
41   simple_tbm_files,
42   dependencies: simple_tbm_deps,
43   install_dir: libds_bindir,
44   install: true,
45 )