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