aboutsummaryrefslogtreecommitdiffhomepage
path: root/nix/patches/meson-build.patch
blob: 2344217224fc5b0257438af86747695af1cd5f26 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff --git a/meson.build b/meson.build
index 726933bc..28b4d9ac 100644
--- a/meson.build
+++ b/meson.build
@@ -29,20 +29,7 @@ add_project_arguments(
   ],
   language: 'cpp')
 
-wlroots = subproject('wlroots', default_options: ['examples=false', 'renderers=gles2'])
-have_xwlr = wlroots.get_variable('features').get('xwayland')
-xcb_dep = dependency('xcb', required: get_option('xwayland'))
-
-cmake = import('cmake')
-udis = cmake.subproject('udis86')
-udis86 = udis.dependency('libudis86')
-
-if get_option('xwayland').enabled() and not have_xwlr
-	error('Cannot enable Xwayland in Hyprland: wlroots has been built without Xwayland support')
-endif
-have_xwayland = xcb_dep.found() and have_xwlr
-
-if not have_xwayland
+if get_option('xwayland').disabled()
   add_project_arguments('-DNO_XWAYLAND', language: 'cpp')
 endif
 
@@ -71,8 +58,6 @@ foreach file : headers
   install_headers(file, subdir: 'hyprland', preserve_path: true)
 endforeach
 
-version_h = run_command('sh', '-c', 'scripts/generateVersion.sh')
-
 subdir('protocols')
 subdir('src')
 subdir('hyprctl')
diff --git a/src/meson.build b/src/meson.build
index 2065c6f5..55530605 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -9,16 +9,16 @@ executable('Hyprland', src,
     server_protos,
     dependency('wayland-server'),
     dependency('wayland-client'),
-    wlroots.get_variable('wlroots'),
+    dependency('wlroots'),
     dependency('cairo'),
     dependency('libdrm'),
     dependency('egl'),
     dependency('xkbcommon'),
     dependency('libinput'),
-    xcb_dep,
+    dependency('xcb', required: get_option('xwayland')),
     backtrace_dep,
     systemd_dep,
-    udis86,
+    dependency('udis86'),
 
     dependency('pixman-1'),
     dependency('gl', 'opengl'),