simple_shm_shell_files = ['simple-shm-shell.c'] simple_shm_shell_deps = [ dependency('wayland-client', required: true), ] executable('ds-simple-shm-shell', simple_shm_shell_files, dependencies: simple_shm_shell_deps, install_dir: libds_bindir, install: true, ) wayland_tbm_client = dependency('wayland-tbm-client', required: false) libtbm = dependency('libtbm', required: false) if not wayland_tbm_client.found() or not libtbm.found() subdir_done() endif simple_tbm_files = ['simple-tbm.c'] simple_tbm_deps = [ dependency('wayland-client', required: true), wayland_tbm_client, libtbm, ] protocols = { 'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml', } protocols_code = {} protocols_client_header = {} foreach name, path : protocols code = custom_target( name.underscorify() + '_c', input: path, output: '@BASENAME@-protocol.c', command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'], ) simple_tbm_files += code client_header = custom_target( name.underscorify() + '_client_h', input: path, output: '@BASENAME@-client-protocol.h', command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'], build_by_default: false, ) simple_tbm_files += client_header endforeach executable('ds-simple-tbm', simple_tbm_files, dependencies: simple_tbm_deps, install_dir: libds_bindir, install: true, )