aboutsummaryrefslogtreecommitdiff
path: root/desktop/labwc/use-system-wlroots.patch
blob: 3da8758174be6a04a56708d7cab99cbe1d0cd311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/meson.build	2022-04-08 17:44:37.000000000 -0300
+++ b/meson.build	2022-05-11 01:37:46.655283415 -0300
@@ -37,22 +37,14 @@
 endif
 add_project_arguments('-DLABWC_VERSION=@0@'.format(version), language: 'c')
 
-wlroots_version = ['>=0.15.0', '<0.16.0']
-wlroots_proj = subproject(
-  'wlroots',
-  default_options: ['default_library=static', 'examples=false'],
-  required: false,
-  version: wlroots_version,
+wlroots = dependency(
+ 'wlroots',
+default_options: ['default_library=static', 'examples=false'],
+version: ['>=0.15.0', '<0.16.0'],
 )
 
-if wlroots_proj.found()
-  wlroots = wlroots_proj.get_variable('wlroots')
-  wlroots_conf = wlroots_proj.get_variable('conf_data')
-  wlroots_has_xwayland = wlroots_conf.get('WLR_HAS_XWAYLAND') == 1
-else
-  wlroots = dependency('wlroots', version: wlroots_version)
-  wlroots_has_xwayland = cc.get_define('WLR_HAS_XWAYLAND', prefix: '#include <wlr/config.h>', dependencies: wlroots) == '1'
-endif
+wlroots_has_xwayland = wlroots.get_variable('have_xwayland') == 'true'
+
 wayland_server = dependency('wayland-server', version: '>=1.19.0')
 wayland_protos = dependency('wayland-protocols')
 xkbcommon = dependency('xkbcommon')