1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

meson: Use get_pkgconfig_variable('cflags')

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>
This commit is contained in:
Andrea Bolognani 2021-05-26 19:03:16 +02:00
parent 5ca06d703b
commit c32c5ca29a

View File

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