Skip to content

Commit

Permalink
Add a system method for obtaining GL dependency on Linux OS
Browse files Browse the repository at this point in the history
  • Loading branch information
helenginn authored and eli-schwartz committed Mar 24, 2023
1 parent 4fedf19 commit 3ca56dc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mesonbuild/dependencies/ui.py
Expand Up @@ -45,12 +45,20 @@ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.
self.link_args = ['-framework', 'OpenGL']
# FIXME: Detect version using self.clib_compiler
return
if self.env.machines[self.for_machine].is_windows():
elif self.env.machines[self.for_machine].is_windows():
self.is_found = True
# FIXME: Use self.clib_compiler.find_library()
self.link_args = ['-lopengl32']
# FIXME: Detect version using self.clib_compiler
return
else:
links = self.clib_compiler.find_library('GL', environment, [])
has_header = self.clib_compiler.has_header('GL/gl.h', '', environment)[0]
if links and has_header:
self.is_found = True
self.link_args = links
elif links:
raise DependencyException('Found GL runtime library but no development header files')

class GnuStepDependency(ConfigToolDependency):

Expand Down

0 comments on commit 3ca56dc

Please sign in to comment.