ExtraFrameworkDependency: Don't set required

Otherwise we will never hit the informative DependencyException.
pull/1900/head
Nirbheek Chauhan 8 years ago
parent 0b08d5aab5
commit c4d7667675
  1. 4
      mesonbuild/dependencies/base.py
  2. 6
      mesonbuild/dependencies/ui.py

@ -139,7 +139,7 @@ class ExternalDependency(Dependency):
self.static = kwargs.get('static', False)
if not isinstance(self.static, bool):
raise DependencyException('Static keyword must be boolean')
# Is this dependency for cross-com,pilation?
# Is this dependency for cross-compilation?
if 'native' in kwargs and self.env.is_cross_build():
self.want_cross = not kwargs['native']
else:
@ -619,7 +619,7 @@ def find_external_dependency(name, env, kwargs):
except Exception as e:
pkg_exc = e
if mesonlib.is_osx():
fwdep = ExtraFrameworkDependency(name, required, None, env, kwargs)
fwdep = ExtraFrameworkDependency(name, False, None, env, None, kwargs)
if required and not fwdep.found():
m = 'Dependency {!r} not found, tried Extra Frameworks ' \
'and Pkg-Config:\n\n' + str(pkg_exc)

@ -310,7 +310,8 @@ class QtBaseDependency(ExternalDependency):
libdir = qvars['QT_INSTALL_LIBS']
for m in modules:
fname = 'Qt' + m
fwdep = ExtraFrameworkDependency(fname, kwargs.get('required', True), libdir, kwargs)
fwdep = ExtraFrameworkDependency(fname, False, libdir, self.env,
self.language, kwargs)
self.cargs.append('-F' + libdir)
if fwdep.found():
self.is_found = True
@ -400,7 +401,8 @@ class SDL2Dependency(ExternalDependency):
mlog.debug('Could not find sdl2-config binary, trying next.')
if DependencyMethods.EXTRAFRAMEWORK in self.methods:
if mesonlib.is_osx():
fwdep = ExtraFrameworkDependency('sdl2', False, None, kwargs)
fwdep = ExtraFrameworkDependency('sdl2', False, None, self.env,
self.language, kwargs)
if fwdep.found():
self.is_found = True
self.compile_args = fwdep.get_compile_args()

Loading…
Cancel
Save