[atk/docs-fixes: 56/56] Use Meson to generate the pkgconfig file
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atk/docs-fixes: 56/56] Use Meson to generate the pkgconfig file
- Date: Fri, 14 Jun 2019 15:51:24 +0000 (UTC)
commit b7bf5f1fad26051892b0adb23936813798292583
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Jun 26 17:20:33 2018 +0100
Use Meson to generate the pkgconfig file
Meson can generate a compliant pkgconfig file for us, straight from the
library we just built, without using a template file.
atk.pc.in | 11 -----------
atk/meson.build | 9 ++++++++-
meson.build | 22 +++-------------------
3 files changed, 11 insertions(+), 31 deletions(-)
---
diff --git a/atk/meson.build b/atk/meson.build
index 042cd54..4760df8 100644
--- a/atk/meson.build
+++ b/atk/meson.build
@@ -121,7 +121,7 @@ if host_system == 'windows'
atk_sources += atk_win_res
endif
-libatk = library('atk-@0@'.format(atk_api_version),
+libatk = library(atk_api_name,
sources: atk_sources + atk_enums + atk_marshals,
soversion: atk_soversion,
version: atk_libversion,
@@ -157,3 +157,10 @@ libatk_dep = declare_dependency(link_with: libatk,
dependencies: glib_dep,
sources: atk_sources_dep,
)
+
+pkgconfig.generate(libatk,
+ name: 'Atk',
+ description: 'Accessibility Toolkit',
+ subdirs: atk_api_name,
+ filebase: 'atk',
+)
diff --git a/meson.build b/meson.build
index 3f008ac..f25c6c0 100644
--- a/meson.build
+++ b/meson.build
@@ -20,7 +20,8 @@ atk_interface_age = 1
atk_binary_age = 10000 * atk_major_version + 100 * atk_minor_version + 10 + atk_micro_version
atk_api_version = '1.0'
-atk_api_path = 'atk-@0@/atk'.format(atk_api_version)
+atk_api_name = 'atk-@0@'.format(atk_api_version)
+atk_api_path = '@0@/atk'.format(atk_api_name)
atk_prefix = get_option('prefix')
atk_libdir = join_paths(atk_prefix, get_option('libdir'))
@@ -99,24 +100,7 @@ glib_dep = [dependency('glib-2.0', version: glib_req_version,
dependency('gobject-2.0', version: glib_req_version,
fallback : ['glib', 'libgobject_dep'])]
-# Compat variables for pkgconfig
-pkgconf = configuration_data()
-pkgconf.set('prefix', atk_prefix)
-pkgconf.set('exec_prefix', atk_prefix)
-pkgconf.set('libdir', atk_libdir)
-pkgconf.set('includedir', atk_includedir)
-pkgconf.set('VERSION', meson.project_version())
-pkgconf.set('ATK_API_VERSION', atk_api_version)
-pkgconf.set('srcdir', '.')
-
-foreach pkg: [ 'atk.pc', ]
- configure_file(input: pkg + '.in',
- output: pkg,
- configuration: pkgconf,
- install: true,
- install_dir: join_paths(atk_libdir, 'pkgconfig'))
-endforeach
-
+pkgconfig = import('pkgconfig')
gnome = import('gnome')
# Internal configuration header
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]