diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-04-22 21:16:08 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2020-04-23 16:32:10 -0400 |
commit | d01a387475e2665275a6cd6b0059bf91121b8300 (patch) | |
tree | be0ebaca7c7390e97b340d4b51cd36367bc74ed9 /meson.build | |
parent | ec00edd941953626ac027810f747847f68a71000 (diff) | |
download | gobject-introspection-d01a387475e2665275a6cd6b0059bf91121b8300.tar.gz |
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.
Bump Meson version to 0.54.0 to use meson.override_dependency().
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 3d22dd55..f6f62444 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('gobject-introspection', 'c', version: '1.64.1', - meson_version: '>= 0.50.1', + meson_version: '>= 0.54.0', default_options: [ 'warning_level=1', 'buildtype=debugoptimized', @@ -264,3 +264,16 @@ 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']) +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) |