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



commit 0954ee55964ca77d51236672ebee5e7dc8d5a36f
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 49da09e..d1116a4 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 38c78cb..9bd02bf 100644
--- a/meson.build
+++ b/meson.build
@@ -35,17 +35,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
@@ -169,13 +158,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]