From df1c12f9829acdb73ff714cc2598138e4e03ca74 Mon Sep 17 00:00:00 2001 From: Bill Doyle Date: Thu, 25 Apr 2019 21:02:14 -0400 Subject: [PATCH] Prefer wlroots subproject --- meson.build | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 656611c..bc35d47 100644 --- 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') -- 2.45.2