Revert "meson: Add schemasdir and giomoduledir to gio dependency"

This reverts commit 5aa03882ca.

It fails to compile on newer Meson versions with
`--fatal-meson-warnings` due to:
```
WARNING: Project targeting '>= 0.52.0' but tried to use feature introduced in '0.54.0': variables arg in declare_dependency.
gio/meson.build:833:0: ERROR: Fatal warnings enabled, aborting
```

That happens regardless of the fact that we’ve correctly limited the use
of the `variables` argument to only when building with Meson ≥ 0.56.
Unfortunately Meson can’t statically detect that the argument is
conditional.

Bumping GLib’s Meson dependency is too much work right now, so this MR
unfortunately has to be reverted.
This commit is contained in:
Philip Withnall 2022-02-23 11:51:13 +00:00
parent b615afc0fa
commit 590a2c9af8

View File

@ -819,22 +819,9 @@ endif
schemas_subdir = join_paths('glib-2.0', 'schemas')
# Work around variables kwarg requiring Meson 0.56
declare_dependency_kwargs = {}
if meson.version().version_compare('>=0.56.0')
declare_dependency_kwargs = {
'variables': [
'schemasdir=' + join_paths(glib_datadir, schemas_subdir),
'giomoduledir=' + glib_giomodulesdir,
]
}
endif
libgio_dep = declare_dependency(link_with : libgio,
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
include_directories : [gioinc],
kwargs : declare_dependency_kwargs,
)
include_directories : [gioinc])
pkg.generate(libgio,
requires : ['glib-2.0', 'gobject-2.0'],