Merge pull request #1986 from phako/master

Skip handling non-available dependencies
pull/1995/merge
Jussi Pakkanen 8 years ago committed by GitHub
commit 4a4322064e
  1. 3
      mesonbuild/backend/backends.py
  2. 5
      test cases/vala/3 dep/meson.build

@ -429,6 +429,9 @@ class Backend:
# NOTE: We must preserve the order in which external deps are # NOTE: We must preserve the order in which external deps are
# specified, so we reverse the list before iterating over it. # specified, so we reverse the list before iterating over it.
for dep in reversed(target.get_external_deps()): for dep in reversed(target.get_external_deps()):
if not dep.found():
continue
if compiler.language == 'vala': if compiler.language == 'vala':
if isinstance(dep, dependencies.PkgConfigDependency): if isinstance(dep, dependencies.PkgConfigDependency):
if dep.name == 'glib-2.0' and dep.version_reqs is not None: if dep.name == 'glib-2.0' and dep.version_reqs is not None:

@ -2,7 +2,10 @@ project('giotest', 'vala', 'c')
glib = dependency('glib-2.0') glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0') gobject = dependency('gobject-2.0')
gio = dependency('gio-2.0') gio = [dependency('gio-2.0'),
# https://github.com/mesonbuild/meson/issues/1484
dependency('gio-unix-2.0', required : false),
dependency('gio-windows-2.0', required : false)]
e = executable('gioprog', 'gioprog.vala', e = executable('gioprog', 'gioprog.vala',
dependencies : [glib, gobject, gio]) dependencies : [glib, gobject, gio])

Loading…
Cancel
Save