summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-06-26 17:20:33 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2019-06-14 16:47:21 +0100
commitb7bf5f1fad26051892b0adb23936813798292583 (patch)
tree39b947f4817a1c0c39c97e85076795031ca0d790
parenta3261f93b9a79a2e3f4aa7b8f88973f46ae3cfb2 (diff)
downloadatk-b7bf5f1fad26051892b0adb23936813798292583.tar.gz
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.
-rw-r--r--atk.pc.in11
-rw-r--r--atk/meson.build9
-rw-r--r--meson.build22
3 files changed, 11 insertions, 31 deletions
diff --git a/atk.pc.in b/atk.pc.in
deleted file mode 100644
index 51ce841..0000000
--- a/atk.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: Atk
-Description: Accessibility Toolkit
-Version: @VERSION@
-Requires: gobject-2.0
-Libs: -L${libdir} -latk-@ATK_API_VERSION@
-Cflags: -I${includedir}/atk-1.0
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