[wing] meson: generate automatically pc file



commit 5e464798bffbcf11733f48addefe68ad58112b8e
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Mon May 8 10:06:56 2017 +0200

    meson: generate automatically pc file

 meson.build      |    8 --------
 wing-1.0.pc.in   |   11 -----------
 wing/meson.build |   26 +++++++++++++++++---------
 3 files changed, 17 insertions(+), 28 deletions(-)
---
diff --git a/meson.build b/meson.build
index cbaad26..f6710c8 100644
--- a/meson.build
+++ b/meson.build
@@ -141,14 +141,6 @@ glib = dependency('glib-2.0', version: '>=' + glib_req)
 gobject = dependency('gobject-2.0', version: '>=' + glib_req)
 gio = dependency('gio-2.0', version: '>=' + glib_req)
 gio_windows = dependency('gio-windows-2.0', version: '>=' + glib_req)
-build_gobject = gobject.found()
-
-# Generate the pkg-config files
-configure_file(input: 'wing-@0  pc in'.format(wing_api_version),
-               output: 'wing-@0@.pc'.format(wing_api_version),
-               configuration: conf,
-               install: true,
-               install_dir: join_paths(wing_libdir, 'pkgconfig'))
 
 subdir('wing')
 subdir('tests')
diff --git a/wing/meson.build b/wing/meson.build
index 14fdaae..764286b 100644
--- a/wing/meson.build
+++ b/wing/meson.build
@@ -39,15 +39,23 @@ else
 endif
 
 wing = shared_library('wing-@0@'.format(wing_api_version),
-  include_directories: core_inc,
-  sources: sources,
-  version: libversion,
-  soversion: soversion,
-  install: true,
-  dependencies: platform_deps,
-  c_args: extra_args + common_flags + [
-            '-DG_LOG_DOMAIN="Wing"' ],
-  link_args: wing_link_args)
+                      include_directories: core_inc,
+                      sources: sources,
+                      version: libversion,
+                      soversion: soversion,
+                      install: true,
+                      dependencies: platform_deps,
+                      c_args: extra_args + common_flags + [ '-DG_LOG_DOMAIN="Wing"' ],
+                      link_args: wing_link_args)
+
+# Generate pc file
+pkgg = import('pkgconfig')
+
+pkgg.generate(libraries: [ wing ],
+              version: libversion,
+              name: 'wing',
+              description: 'Wing is a library which provides GLib-like API to some Windows API.',
+              requires: 'glib-2.0 >= ' + glib_req + ', gobject-2.0 >= ' + glib_req + ', gio-2.0 >= ' + 
glib_req)
 
 # Internal dependency, for tests and benchmarks
 wing_inc = include_directories([ '.', '..' ])


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