meson.build 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. protocols = [
  2. 'idle-inhibit-unstable-v1',
  3. 'keyboard-shortcuts-inhibit-unstable-v1',
  4. 'pointer-constraints-unstable-v1',
  5. 'primary-selection-unstable-v1',
  6. 'relative-pointer-unstable-v1',
  7. 'tablet-unstable-v2',
  8. 'text-input-unstable-v3',
  9. 'viewporter',
  10. 'wayland',
  11. 'xdg-activation-v1',
  12. 'xdg-decoration-unstable-v1',
  13. 'xdg-output-unstable-v1',
  14. 'xdg-shell',
  15. ]
  16. if wayland_scanner.found() and wayland_found
  17. foreach proto : protocols
  18. proto_xml = '@0@.xml'.format(proto)
  19. proto_c = '@0@-protocol.c'.format(proto)
  20. proto_h = '@0@-client-protocol.h'.format(proto)
  21. c_sources += custom_target(proto_c,
  22. command : [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
  23. input : proto_xml,
  24. output : proto_c,
  25. )
  26. c_sources += custom_target(proto_h,
  27. command : [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
  28. input : proto_xml,
  29. output : proto_h,
  30. )
  31. endforeach
  32. core_inc += include_directories('.')
  33. endif