[libgxps/wip/nacho/meson: 4/6] Automatically generate the pkgconfig file



commit ff61345bf9afdb92f9456f06c37bd8d66dd721da
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Mon Jun 12 23:03:49 2017 +0200

    Automatically generate the pkgconfig file
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783642

 libgxps.pc.in       |   11 -----------
 libgxps/meson.build |    9 +++++++++
 meson.build         |   18 ------------------
 3 files changed, 9 insertions(+), 29 deletions(-)
---
diff --git a/libgxps/meson.build b/libgxps/meson.build
index 9c91b90..f686b1c 100644
--- a/libgxps/meson.build
+++ b/libgxps/meson.build
@@ -92,6 +92,15 @@ gxps_dep = declare_dependency(link_with: gxps,
                               include_directories: [ gxps_inc, core_inc ],
                               dependencies: gxps_deps)
 
+# Generate the pkg-config file
+pkgg = import('pkgconfig')
+
+pkgg.generate(libraries: gxps,
+              version: gxps_version,
+              name: 'libgxps',
+              description: 'XPS Documents library',
+              requires: 'gobject-2.0 >= ' + glib_req + ', gio-2.0 >= ' + glib_req + ', libarchive >= ' + 
archive_req + ', cairo >= ' + cairo_req)
+
 if build_gir
   gir_extra_args = [
     '--identifier-prefix=GXPS',
diff --git a/meson.build b/meson.build
index 5240a48..44d33e8 100644
--- a/meson.build
+++ b/meson.build
@@ -33,17 +33,6 @@ host_system = host_machine.system()
 
 add_project_arguments('-DHAVE_CONFIG_H', language: 'c')
 
-conf = configuration_data()
-
-# Compat variables for pkgconfig
-conf.set('prefix', gxps_prefix)
-conf.set('exec_prefix', gxps_prefix)
-conf.set('libdir', gxps_libdir)
-conf.set('includedir', gxps_includedir)
-
-# Version macros
-conf.set('VERSION', gxps_version)
-
 # Compiler flags
 if cc.get_id() == 'msvc'
   # Make MSVC more pedantic, this is a recommended pragma list
@@ -167,13 +156,6 @@ build_gir = gir.found() and not meson.is_cross_build() and not get_option('disab
 
 configure_file(output: 'config.h', configuration: cdata)
 
-# Generate the pkg-config files
-configure_file(input: 'libgxps.pc.in',
-               output: 'libgxps.pc',
-               configuration: conf,
-               install: true,
-               install_dir: join_paths(gxps_libdir, 'pkgconfig'))
-
 subdir('libgxps')
 subdir('tools')
 subdir('docs')


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