[libgovirt/wip/jtojnar/meson-pc-reqs: 6/6] meson: Synchronize Requires in .pc file with Autotools
- From: Marc-André Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt/wip/jtojnar/meson-pc-reqs: 6/6] meson: Synchronize Requires in .pc file with Autotools
- Date: Tue, 5 Jul 2022 14:00:06 +0000 (UTC)
commit 8735e2685d2cdf049745e0a3cb2abd61686ed65d
Author: Jan Tojnar <jtojnar gmail com>
Date: Sun Feb 20 20:05:32 2022 +0100
meson: Synchronize Requires in .pc file with Autotools
Without this, they will just be listed in Requires.private.
Also do not add gobject-introspection to the dependencies,
since it is only used for generating introspection
and Meson will check for it automatically.
govirt/meson.build | 5 +++++
meson.build | 18 ++++++++++--------
2 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/govirt/meson.build b/govirt/meson.build
index 778e5c0..fd8f6c1 100644
--- a/govirt/meson.build
+++ b/govirt/meson.build
@@ -129,5 +129,10 @@ pkgconfig.generate(govirt_lib,
filebase : 'govirt-1.0',
description : 'goVirt is a GLib binding for oVirt REST API',
subdirs : 'govirt-1.0',
+ requires : [
+ gobject_dep,
+ gio_dep,
+ rest_dep,
+ ],
variables : 'exec_prefix=${prefix}')
diff --git a/meson.build b/meson.build
index 0ac87fd..955c99d 100644
--- a/meson.build
+++ b/meson.build
@@ -38,15 +38,17 @@ govirt_so_version = '@0@.@1@.@2@'.format(govirt_current - govirt_age,
glib_version_info = '>= 2.38'
glib_encoded_version = 'GLIB_VERSION_2_38'
-deps = {'gobject-2.0' : glib_version_info,
- 'gio-2.0' : glib_version_info,
- 'gthread-2.0' : glib_version_info,
- 'gobject-introspection-1.0' : '>= 1.30.0',
- 'rest-0.7' : '>= 0.7.92',}
+gobject_dep = dependency('gobject-2.0', version : glib_version_info)
+gio_dep = dependency('gio-2.0', version : glib_version_info)
+gthread_dep = dependency('gthread-2.0', version : glib_version_info)
+rest_dep = dependency('rest-0.7', version : '>= 0.7.92')
-foreach dep, version : deps
- govirt_deps += dependency(dep, version : version)
-endforeach
+govirt_deps += [
+ gobject_dep,
+ gio_dep,
+ gthread_dep,
+ rest_dep,
+]
#
# global C defines
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]