[gobject-introspection] Meson: Override gobject-introspection-1.0 dependency
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Meson: Override gobject-introspection-1.0 dependency
- Date: Fri, 24 Apr 2020 19:18:45 +0000 (UTC)
commit f9d53d9d0020d2a13ca246e19c5ce2e180e5b78a
Author: Xavier Claessens <xavier claessens collabora com>
Date: Fri Apr 24 15:09:27 2020 -0400
Meson: Override gobject-introspection-1.0 dependency
When gobject-introspection-1.0 pkg-config is not found on the system,
Meson can fallback to configure g-i as subproject and needs a dependency
object to replace the pc file.
The dependency file needs to ensure that typelibs are created before
compiling any other gir and provide the girdir for files within build
directory. It also need to provide glib dependencies required to compile
girs.
meson.build | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/meson.build b/meson.build
index 3d22dd55..892f9c3c 100644
--- a/meson.build
+++ b/meson.build
@@ -264,3 +264,21 @@ configure_file(
configuration: pkgconfig_conf,
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
)
+
+# Dependency object used by Meson's GNOME module. This dependency variable must
+# be named girepo_dep for backward compatibility with projects that where already
+# using that name as fallback: dependency('gobject-introspection-1.0',
+# fallback : ['gobject-introspection', 'girepo_dep'])
+# FIXME: meson.override_dependency() and declare_dependency()'s variable arguments
+# are new in Meson 0.54.0, older versions of Meson won't be able to use g-i as
+# subproject anyway
+if meson.version().version_compare('>=0.54.0')
+ girepo_dep = declare_dependency(
+ sources: typelibs,
+ dependencies: girepo_dep,
+ variables: {
+ 'girdir': meson.current_build_dir() / 'gir',
+ },
+ )
+ meson.override_dependency('gobject-introspection-1.0', girepo_dep)
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]