summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2017-03-28 14:25:06 -0300
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-03-28 14:29:26 -0300
commit6a37782549f25535ea2624b7a9c34a78d45bb626 (patch)
treebc072f3ceef021319b3868444d12536737d604ed
parentf57ca17a22284f62c86daa0e06e1d6d9094bff76 (diff)
meson: Use get_pkgconfig_variable instead of calling pkg-config ourself
It is avalaible in meson 0.36 which is now are requirement Nothing happens on not found dependencies.
-rw-r--r--tests/check/meson.build19
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/check/meson.build b/tests/check/meson.build
index a0a56be7..f571bd91 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -33,18 +33,15 @@ test_defines = [
]
pluginsdirs = []
-if not meson.is_subproject()
- pkgconfig = find_program('pkg-config')
- runcmd = run_command(pkgconfig, '--variable=pluginsdir',
- 'gstreamer-' + apiversion, 'gstreamer-plugins-base-' + apiversion,
- 'gstreamer-plugins-bad-' + apiversion,
- 'gstreamer-plugins-good-' + apiversion)
+if gst_dep.type_name() == 'pkgconfig'
+ pbase = dependency('gstreamer-plugins-base-' + apiversion, required : false)
+ pbad = dependency('gstreamer-plugins-bad-' + apiversion, required : false)
+ pgood = dependency('gstreamer-plugins-good-' + apiversion, required : false)
- if runcmd.returncode() == 0
- pluginsdirs = runcmd.stdout().split()
- else
- error('Could not determine GStreamer core plugins directory for unit tests.')
- endif
+ pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir'),
+ pbase.get_pkgconfig_variable('pluginsdir'),
+ pbad.get_pkgconfig_variable('pluginsdir'),
+ pgood.get_pkgconfig_variable('pluginsdir')]
endif
foreach t : ges_tests