meson: install pkgconfig files

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-06-29 21:56:09 +02:00
parent 700f0aac6d
commit c3669c8675
3 changed files with 29 additions and 7 deletions

View File

@ -25,9 +25,6 @@ SUBDIRS = .
XZ_OPT ?= -v -T0 XZ_OPT ?= -v -T0
export XZ_OPT export XZ_OPT
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
rpm: clean rpm: clean
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz) @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)

View File

@ -109,9 +109,5 @@ AC_CONFIG_FILES([\
Makefile \ Makefile \
.color_coded \ .color_coded \
.ycm_extra_conf.py \ .ycm_extra_conf.py \
libvirt.pc \
libvirt-qemu.pc \
libvirt-lxc.pc \
libvirt-admin.pc \
libvirt.spec mingw-libvirt.spec]) libvirt.spec mingw-libvirt.spec])
AC_OUTPUT AC_OUTPUT

View File

@ -2234,6 +2234,35 @@ subdir('po')
subdir('docs') subdir('docs')
# install pkgconfig files
pkgconfig_files = [
'libvirt.pc.in',
'libvirt-qemu.pc.in',
'libvirt-lxc.pc.in',
'libvirt-admin.pc.in',
]
pkgconfig_conf = configuration_data()
pkgconfig_conf.set('VERSION', meson.project_version())
pkgconfig_conf.set('datadir', datadir)
pkgconfig_conf.set('datarootdir', datadir)
pkgconfig_conf.set('exec_prefix', prefix)
pkgconfig_conf.set('includedir', includedir)
pkgconfig_conf.set('libdir', libdir)
pkgconfig_conf.set('prefix', prefix)
pkgconfig_dir = libdir / 'pkgconfig'
foreach file : pkgconfig_files
configure_file(
input: file,
output: '@BASENAME@',
configuration: pkgconfig_conf,
install: true,
install_dir: pkgconfig_dir,
)
endforeach
# generate meson-config.h file # generate meson-config.h file
configure_file(output: 'meson-config.h', configuration: conf) configure_file(output: 'meson-config.h', configuration: conf)