project('wayland_test', 'c') wayland_client = dependency('wayland-client') wayland_protocols = dependency('wayland-protocols') xdg_shell_xml = wayland_protocols.get_variable(pkgconfig: 'pkgdatadir') + '/stable/xdg-shell/xdg-shell.xml' xdg_shell_header = custom_target( 'xdg-shell-client-protocol.h', input: xdg_shell_xml, output: 'xdg-shell-client-protocol.h', command: ['wayland-scanner', 'client-header', '@INPUT@', '@OUTPUT@'] ) xdg_shell_source = custom_target( 'xdg-shell-protocol.c', input: xdg_shell_xml, output: 'xdg-shell-protocol.c', command: ['wayland-scanner', 'private-code', '@INPUT@', '@OUTPUT@'] ) executable('simple-wayland-client', ['main.c', xdg_shell_source, xdg_shell_header], dependencies: [wayland_client], include_directories: include_directories('.') )