aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2022-01-18 13:41:01 +0100
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2022-01-18 13:57:50 -0500
commita1905c6a087fa428d86f42c81333f5ad2abee6c8 (patch)
treedd71080c4f5b036202b40636bb215bb4598c7fee
parenttransaction: destroying nodes aren't hidden (diff)
downloadsway-a1905c6a087fa428d86f42c81333f5ad2abee6c8.tar.gz
sway-a1905c6a087fa428d86f42c81333f5ad2abee6c8.tar.zst
sway-a1905c6a087fa428d86f42c81333f5ad2abee6c8.zip
build: execute wlroots subproject before finding deps
wlroots often requires dependencies more recent than Sway's. Executing the wlroots subproject first will give Meson a chance to find these newer dependencies, possibly via subprojects. The subproject will override the "wlroots" dependency when executed, so we don't need to use get_variable anymore. References: https://github.com/swaywm/sway/pull/6498#issuecomment-1001746017
-rw-r--r--meson.build24
1 files changed, 10 insertions, 14 deletions
diff --git a/meson.build b/meson.build
index b226ac83..71183007 100644
--- a/meson.build
+++ b/meson.build
@@ -35,6 +35,15 @@ if is_freebsd
35 add_project_arguments('-D_C11_SOURCE', language: 'c') 35 add_project_arguments('-D_C11_SOURCE', language: 'c')
36endif 36endif
37 37
38# Execute the wlroots subproject, if any
39wlroots_version = ['>=0.16.0', '<0.17.0']
40subproject(
41 'wlroots',
42 default_options: ['examples=false'],
43 required: false,
44 version: wlroots_version,
45)
46
38jsonc = dependency('json-c', version: '>=0.13') 47jsonc = dependency('json-c', version: '>=0.13')
39pcre = dependency('libpcre') 48pcre = dependency('libpcre')
40wayland_server = dependency('wayland-server', version: '>=1.20.0') 49wayland_server = dependency('wayland-server', version: '>=1.20.0')
@@ -42,6 +51,7 @@ wayland_client = dependency('wayland-client')
42wayland_cursor = dependency('wayland-cursor') 51wayland_cursor = dependency('wayland-cursor')
43wayland_egl = dependency('wayland-egl') 52wayland_egl = dependency('wayland-egl')
44wayland_protos = dependency('wayland-protocols', version: '>=1.24') 53wayland_protos = dependency('wayland-protocols', version: '>=1.24')
54wlroots = dependency('wlroots', version: wlroots_version)
45xkbcommon = dependency('xkbcommon') 55xkbcommon = dependency('xkbcommon')
46cairo = dependency('cairo') 56cairo = dependency('cairo')
47pango = dependency('pango') 57pango = dependency('pango')
@@ -60,20 +70,6 @@ fish_comp = dependency('fish', required: false)
60math = cc.find_library('m') 70math = cc.find_library('m')
61rt = cc.find_library('rt') 71rt = cc.find_library('rt')
62 72
63# Try first to find wlroots as a subproject, then as a system dependency
64wlroots_version = ['>=0.16.0', '<0.17.0']
65wlroots_proj = subproject(
66 'wlroots',
67 default_options: ['examples=false'],
68 required: false,
69 version: wlroots_version,
70)
71if wlroots_proj.found()
72 wlroots = wlroots_proj.get_variable('wlroots')
73else
74 wlroots = dependency('wlroots', version: wlroots_version)
75endif
76
77wlroots_features = { 73wlroots_features = {
78 'xwayland': false, 74 'xwayland': false,
79} 75}