From aaca5f5106bde3ce441be31fcb86ed346ac27f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 9 Sep 2021 21:40:18 +0400 Subject: [PATCH] meson: override dependency provided as subproject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Meson 0.54.0 added a new method meson.override_dependency() that must be used to ensure dependency consistency. This also has the effect that with Meson >0.54.0 an application depending on slirp can declare the fallback without knowing the dependency variable name: dependency('slirp'). Signed-off-by: Marc-André Lureau --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index cb1396a..3ef46d1 100644 --- a/meson.build +++ b/meson.build @@ -158,5 +158,9 @@ else endif libslirp_dep = declare_dependency( include_directories: include_directories('.', 'src'), - link_with: lib) + link_with: lib + ) + if meson.version().version_compare('>= 0.54.0') + meson.override_dependency('slirp', libslirp_dep) + endif endif -- GitLab