[libvirt PATCH 06/26] meson: Use get_pkgconfig_variable('cflags')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 meson.build | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 9c494faa5c..7f6756abca 100644
--- a/meson.build
+++ b/meson.build
@@ -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',
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux