From a7be8815b50b68214074a97e6f2ce84368e16f30 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 28 Mar 2017 14:23:16 -0300 Subject: [PATCH] meson: Use get_pkgconfig_variable instead of calling pkg-config ourself It is avalaible in meson 0.36 which is now are requirement --- tests/check/meson.build | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/check/meson.build b/tests/check/meson.build index 83a780b..441f21e 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build @@ -126,19 +126,11 @@ test_defines = [ '-DGST_USE_UNSTABLE_API', ] -pluginsdirs = [ ] -# FIXME: Use if not gst_dep.is_internal() when avalaible as we only support the -# case where GStreamer is another subproject here. -if not meson.is_subproject() - pkgconfig = find_program('pkg-config') - runcmd = run_command(pkgconfig, '--variable=pluginsdir', - 'gstreamer-' + api_version, 'gstreamer-plugins-base-' + api_version) - - if runcmd.returncode() == 0 - pluginsdirs = runcmd.stdout().split() - else - error('Could not determine GStreamer core plugins directory for unit tests.') - endif +pluginsdirs = [] +if gst_dep.type_name() == 'pkgconfig' + pbase = dependency('gstreamer-plugins-base-' + api_version, required : false) + pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir'), + pbase.get_pkgconfig_variable('pluginsdir')] endif # fake device drivers: we could run hardware element tests against dummy drivers -- 2.7.4