Skip to content

Commit

Permalink
wrap: Update doc to give dependency_names example first
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse committed Jul 1, 2020
1 parent 41aefd2 commit 95c3fee
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/markdown/Wrap-dependency-system-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,28 +156,28 @@ where `dependency_name` usually match the corresponding pkg-config name and
`variable_name` is the name of a variable defined in the subproject that should
be returned for that dependency.

For example `glib.wrap` provides `glib-2.0`, `gobject-2.0` and `gio-2.0`. A wrap
file for glib would look like:
For example when using a recent enough version of glib that uses
`meson.override_dependency()` to override `glib-2.0`, `gobject-2.0` and `gio-2.0`,
a wrap file would look like:
```ini
[wrap-git]
url=https://gitlab.gnome.org/GNOME/glib.git
revision=glib-2-62

[provide]
glib-2.0=glib_dep
gobject-2.0=gobject_dep
gio-2.0=gio_dep
dependency_names = glib-2.0, gobject-2.0, gio-2.0
```

Alternatively, when using a recent enough version of glib that uses
`meson.override_dependency()`:
With older version of glib dependency variable names need to be specified:
```ini
[wrap-git]
url=https://gitlab.gnome.org/GNOME/glib.git
revision=glib-2-62

[provide]
dependency_names = glib-2.0, gobject-2.0, gio-2.0
glib-2.0=glib_dep
gobject-2.0=gobject_dep
gio-2.0=gio_dep
```

With such wrap file, `dependency('glib-2.0')` will automatically fallback to use
Expand Down

0 comments on commit 95c3fee

Please sign in to comment.