mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-23 01:40:12 -05:00
meson: add xdg-activation-v1.xml conditionally
Only enable XDG activation when compiling against wayland-protocols 1.21. Older versions don’t have this protocol. When available, define HAVE_XDG_ACTIVATION. Make all usages of xdg_activation_v1 and xdg_activation_token_v1 conditional.
This commit is contained in:
parent
bf44f3f594
commit
03e1b906ab
3 changed files with 31 additions and 3 deletions
|
|
@ -88,16 +88,21 @@ wscanner_prog = find_program(
|
|||
|
||||
wl_proto_headers = []
|
||||
wl_proto_src = []
|
||||
foreach prot : [
|
||||
wl_proto_xml = [
|
||||
wayland_protocols_datadir + '/stable/xdg-shell/xdg-shell.xml',
|
||||
wayland_protocols_datadir + '/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml',
|
||||
wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml',
|
||||
wayland_protocols_datadir + '/unstable/primary-selection/primary-selection-unstable-v1.xml',
|
||||
wayland_protocols_datadir + '/stable/presentation-time/presentation-time.xml',
|
||||
wayland_protocols_datadir + '/unstable/text-input/text-input-unstable-v3.xml',
|
||||
wayland_protocols_datadir + '/staging/xdg-activation/xdg-activation-v1.xml',
|
||||
]
|
||||
|
||||
if wayland_protocols.version().version_compare('>=1.21')
|
||||
add_project_arguments('-DHAVE_XDG_ACTIVATION', language: 'c')
|
||||
wl_proto_xml += [wayland_protocols_datadir + '/staging/xdg-activation/xdg-activation-v1.xml']
|
||||
endif
|
||||
|
||||
foreach prot : wl_proto_xml
|
||||
wl_proto_headers += custom_target(
|
||||
prot.underscorify() + '-client-header',
|
||||
output: '@BASENAME@.h',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue