]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Use get_pkgconfig_variable('cflags')
authorAndrea Bolognani <abologna@redhat.com>
Wed, 26 May 2021 17:03:16 +0000 (19:03 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 1 Jun 2021 12:30:39 +0000 (14:30 +0200)
Meson offers a native convenience method that can be used to
fetch pkg-config variables from a dependency, so we can use
that instead of calling pkg-config manually.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
meson.build

index a7981e7bc47dc8b15b32f6a10f2bb9a970b3a612..9e606775132209d201a23d7968cfc6ae7249d4a4 100644 (file)
@@ -1309,9 +1309,7 @@ if yajl_dep.found()
   #
   # [1] https://github.com/Homebrew/homebrew-core/pull/74516
   if host_machine.system() != 'linux'
-    pkg_config_prog = find_program('pkg-config')
-    rc = run_command(pkg_config_prog, '--cflags', 'yajl', check: true)
-    cflags = rc.stdout().strip()
+    cflags = yajl_dep.get_pkgconfig_variable('cflags')
     if cflags.contains('include/yajl')
       rc = run_command(
         'python3', '-c',