From a324d22dfe6a1f26b80cc9245b744bb390965190 Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Sat, 19 Jan 2019 19:21:13 +0100 Subject: [PATCH] meson: check WLR_HAS_XWAYLAND when building with XWayland --- meson.build | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c97013c..421247d 100644 --- a/meson.build +++ b/meson.build @@ -51,8 +51,20 @@ server_protos = declare_dependency( sources: server_protos_headers, ) +if get_option('xwayland') + cc = meson.get_compiler('c') + wlroots_has_xwayland = cc.get_define('WLR_HAS_XWAYLAND', prefix: '#include ', dependencies: wlroots) == '1' + if not wlroots_has_xwayland + error('Cannot build Cage with XWayland support: wlroots has been built without it') + else + have_xwayland = true + endif +else + have_xwayland = false +endif + conf_data = configuration_data() -conf_data.set10('CAGE_HAS_XWAYLAND', get_option('xwayland')) +conf_data.set10('CAGE_HAS_XWAYLAND', have_xwayland) cage_sources = [ 'cage.c',