Fix incorrect checking of build machine for dependency availability

Don't check the build machine to determine a dependency whose availability
is static property of the host machine
This commit is contained in:
Jon Turney 2018-09-16 16:10:06 +01:00 committed by Jussi Pakkanen
parent 26ff712bae
commit 4fc1ca20b6
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ class AppleFrameworks(ExternalDependency):
for f in self.frameworks:
self.link_args += ['-framework', f]
self.is_found = mesonlib.is_osx()
self.is_found = mesonlib.for_darwin(self.want_cross, self.env)
def log_tried(self):
return 'framework'

View File

@ -39,13 +39,13 @@ class GLDependency(ExternalDependency):
def __init__(self, environment, kwargs):
super().__init__('gl', environment, None, kwargs)
if mesonlib.is_osx():
if mesonlib.for_darwin(self.want_cross, self.env):
self.is_found = True
# FIXME: Use AppleFrameworks dependency
self.link_args = ['-framework', 'OpenGL']
# FIXME: Detect version using self.clib_compiler
return
if mesonlib.is_windows():
if mesonlib.for_windows(self.want_cross, self.env):
self.is_found = True
# FIXME: Use self.clib_compiler.find_library()
self.link_args = ['-lopengl32']