diff options
author | Helen Ginn <github@hginn.co.uk> | 2023-03-20 19:12:11 +0100 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-03-24 16:10:49 -0400 |
commit | 3ca56dc778978dc591c83ea5d10c597bdbf5d746 (patch) | |
tree | 2685fcd4ca0ff4aee2d41b1eb9c099e3c528a5d8 | |
parent | 4fedf19f41a99e0abd5ed18916e42e12e420c6bf (diff) | |
download | meson-3ca56dc778978dc591c83ea5d10c597bdbf5d746.zip meson-3ca56dc778978dc591c83ea5d10c597bdbf5d746.tar.gz meson-3ca56dc778978dc591c83ea5d10c597bdbf5d746.tar.bz2 |
Add a system method for obtaining GL dependency on Linux OS
-rw-r--r-- | mesonbuild/dependencies/ui.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index 2c341af..71ea1d1 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -45,12 +45,20 @@ class GLDependencySystem(SystemDependency): 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): |