wayland-scanner can generate header files that only include wayland-client-core.h using a flag. Add a core_only option to scan_xml to support this use case.pull/10786/head
parent
a4d5442207
commit
25f838fd33
5 changed files with 38 additions and 1 deletions
@ -0,0 +1,5 @@ |
||||
## Added core_only arg to wayland.scan_xml. |
||||
|
||||
The `scan_xml` function from the wayland module now has an optional bool |
||||
argument `core_only`, so that headers generated by wayland-scanner now |
||||
only include `wayland-client-core.h` instead of `wayland-client.h`. |
@ -0,0 +1,9 @@ |
||||
#include <xdg-shell-client-protocol.h> |
||||
|
||||
int main() { |
||||
#if defined(XDG_SHELL_CLIENT_PROTOCOL_H) && !defined(WAYLAND_CLIENT_H) && !defined(WAYLAND_CLIENT_PROTOCOL_H) |
||||
return 0; |
||||
#else |
||||
return 1; |
||||
#endif |
||||
} |
@ -0,0 +1,14 @@ |
||||
project('wayland-test-core-only', 'c') |
||||
|
||||
wl_protocols_dep = dependency('wayland-protocols', required : false) |
||||
if not wl_protocols_dep.found() |
||||
error('MESON_SKIP_TEST: wayland-protocols not installed') |
||||
endif |
||||
|
||||
wl_mod = import('unstable-wayland') |
||||
wl_client_dep = dependency('wayland-client') |
||||
|
||||
xdg_shell_xml = wl_mod.find_protocol('xdg-shell') |
||||
xdg_shell = wl_mod.scan_xml(xdg_shell_xml, core_only : true) |
||||
exe = executable('core', 'core.c', xdg_shell, dependencies : wl_client_dep) |
||||
test('core', exe) |
Loading…
Reference in new issue