From e774d1ca4b46971ff7d530fc69583fda39beaaf8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 5 Jun 2017 23:57:48 +0100 Subject: [PATCH] meson: use dep.get_pkgconfig_variable() instead of calling pkg-config ourselves. --- ext/libvisual/meson.build | 8 ++------ meson.build | 18 ++++++------------ 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/ext/libvisual/meson.build b/ext/libvisual/meson.build index 1974751..5cc59b1 100644 --- a/ext/libvisual/meson.build +++ b/ext/libvisual/meson.build @@ -5,13 +5,9 @@ libvisual_sources = [ libvisual_dep = dependency('libvisual-0.4', version : '>= 0.4.0', required : false) if libvisual_dep.found() - runcmd = run_command('pkg-config', '--variable=pluginsbasedir', 'libvisual-0.4') - if runcmd.returncode() == 0 - core_conf.set('LIBVISUAL_PLUGINSBASEDIR', '"@0@"'.format(runcmd.stdout().strip())) - endif -endif + core_conf.set_quoted('LIBVISUAL_PLUGINSBASEDIR', + libvisual_dep.get_pkgconfig_variable('pluginsbasedir')) -if libvisual_dep.found() gstlibvisual = library('gstlibvisual', libvisual_sources, c_args : gst_plugins_base_args, diff --git a/meson.build b/meson.build index f48efe8..d55f841 100644 --- a/meson.build +++ b/meson.build @@ -143,18 +143,12 @@ gio_dep = dependency('gio-2.0', version : glib_req) core_conf.set('HAVE_X', x11_dep.found()) core_conf.set('HAVE_GIO_UNIX_2_0', giounix_dep.found()) -runcmd = run_command('pkg-config', '--variable=giomoduledir', 'gio-2.0') -if runcmd.returncode() == 0 - core_conf.set('GIO_MODULE_DIR', '"@0@"'.format(runcmd.stdout().strip())) -endif -runcmd = run_command('pkg-config', '--variable=libdir', 'gio-2.0') -if runcmd.returncode() == 0 - core_conf.set('GIO_LIBDIR', '"@0@"'.format(runcmd.stdout().strip())) -endif -runcmd = run_command('pkg-config', '--variable=prefix', 'gio-2.0') -if runcmd.returncode() == 0 - core_conf.set('GIO_PREFIX', '"@0@"'.format(runcmd.stdout().strip())) -endif +core_conf.set_quoted('GIO_MODULE_DIR', + gio_dep.get_pkgconfig_variable('giomoduledir')) +core_conf.set_quoted('GIO_LIBDIR', + gio_dep.get_pkgconfig_variable('libdir')) +core_conf.set_quoted('GIO_PREFIX', + gio_dep.get_pkgconfig_variable('prefix')) configinc = include_directories('.') libsinc = include_directories('gst-libs') -- 2.7.4