commit df1c12f9829acdb73ff714cc2598138e4e03ca74
parent d304f66ead2ab0915411ad5f706b89cf2b066897
Author: Bill Doyle <vil@vil.lv>
Date: Thu, 25 Apr 2019 21:02:14 -0400
Prefer wlroots subproject
Diffstat:
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
@@ -23,9 +23,20 @@ add_project_arguments(
cc = meson.get_compiler('c')
+# Prefer wlroots subproject if it is available.
+wlroots_proj = subproject(
+ 'wlroots',
+ default_options: ['rootston=false', 'examples=false'],
+ required: false,
+)
+if wlroots_proj.found()
+ wlroots = wlroots_proj.get_variable('wlroots')
+else
+ wlroots = dependency('wlroots')
+endif
+
cairo = dependency('cairo')
math = cc.find_library('m')
-wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots'])
wayland_server = dependency('wayland-server')
wayland_protos = dependency('wayland-protocols')
xkbcommon = dependency('xkbcommon')