[libvirt PATCH 338/351] meson: install pkgconfig files

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 Makefile.am  |  3 ---
 configure.ac |  4 ----
 meson.build  | 29 +++++++++++++++++++++++++++++
 3 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d538d037eb0..e6a37deb4a5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,9 +25,6 @@ SUBDIRS = .
 XZ_OPT ?= -v -T0
 export XZ_OPT
 
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
-
 rpm: clean
 	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
 
diff --git a/configure.ac b/configure.ac
index 06e7f7491e4..b0a6cad178a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,9 +109,5 @@ AC_CONFIG_FILES([\
         Makefile \
         .color_coded \
         .ycm_extra_conf.py \
-        libvirt.pc \
-        libvirt-qemu.pc \
-        libvirt-lxc.pc \
-        libvirt-admin.pc \
         libvirt.spec mingw-libvirt.spec])
 AC_OUTPUT
diff --git a/meson.build b/meson.build
index 65843ed574d..7b858797388 100644
--- a/meson.build
+++ b/meson.build
@@ -2214,6 +2214,35 @@ subdir('po')
 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
 configure_file(output: 'meson-config.h', configuration: conf)
 
-- 
2.26.2




[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