From 0ac02f5e7bd2a6485d1e015cfeb11f9ae1837f3d Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 9 Aug 2021 20:29:18 +0200 Subject: [PATCH] build: allow using subproject for wlroots This is handy when testing cage with a newer wlroots copy, or when developing cage and wlroots patches in parallel. --- meson.build | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 3a84794..6b5bce6 100644 --- a/meson.build +++ b/meson.build @@ -34,7 +34,7 @@ if is_freebsd ) endif -wlroots = dependency('wlroots', version: '>= 0.14.0') +wlroots = dependency('wlroots', version: '>= 0.14.0', fallback: ['wlroots', 'wlroots']) wayland_protos = dependency('wayland-protocols', version: '>=1.14') wayland_server = dependency('wayland-server') pixman = dependency('pixman-1') @@ -65,12 +65,11 @@ server_protos = declare_dependency( ) if get_option('xwayland') - wlroots_has_xwayland = cc.get_define('WLR_HAS_XWAYLAND', prefix: '#include ', dependencies: wlroots) == '1' + wlroots_has_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true' if not wlroots_has_xwayland error('Cannot build Cage with XWayland support: wlroots has been built without it') - else - have_xwayland = true endif + have_xwayland = true else have_xwayland = false endif