aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-11 15:58:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-14 11:26:13 +0000
commit03e1b906abc6b29bb4b76b6e0429b8da9e2e2c0e (patch)
treed66667f97301a0395c591d9062f8a5d67fed333b /meson.build
parentpgo: add wayl_win_set_urgent() stub (diff)
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.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index b78079c3..0c48929a 100644
--- a/meson.build
+++ b/meson.build
@@ -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',