diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-06-19 09:31:32 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-20 11:27:08 +0000 |
commit | d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc (patch) | |
tree | dc535b92cd6f496fbc6cb4153fad7449f286d45a /mesonbuild/dependencies/ui.py | |
parent | ebda6ef9c801278bd15a6499c80fff26071feded (diff) | |
download | meson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.zip meson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.tar.gz meson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.tar.bz2 |
dependencies: Don't assume self.compiler is a C compiler
All dependencies were using find_library, has_header, get_define, etc on
self.compiler assuming that it's a compiler that outputs and consumes
C-like libraries. This is not true for D (and in the future, for Rust)
since although they can consume C libraries, they do not use the
C ecosystem.
For such purposes, we now have self.clib_compiler. Nothing uses
self.compiler anymore as a result, and it has been removed.
Diffstat (limited to 'mesonbuild/dependencies/ui.py')
-rw-r--r-- | mesonbuild/dependencies/ui.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index 44fdcd5..72958dd 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -43,14 +43,14 @@ class GLDependency(ExternalDependency): self.is_found = True # FIXME: Use AppleFrameworks dependency self.link_args = ['-framework', 'OpenGL'] - # FIXME: Detect version using self.compiler + # FIXME: Detect version using self.clib_compiler self.version = '1' return if mesonlib.is_windows(): self.is_found = True - # FIXME: Use self.compiler.find_library() + # FIXME: Use self.clib_compiler.find_library() self.link_args = ['-lopengl32'] - # FIXME: Detect version using self.compiler + # FIXME: Detect version using self.clib_compiler self.version = '1' return @@ -547,7 +547,7 @@ class VulkanDependency(ExternalDependency): inc_path = os.path.join(self.vulkan_sdk, inc_dir) header = os.path.join(inc_path, 'vulkan', 'vulkan.h') lib_path = os.path.join(self.vulkan_sdk, lib_dir) - find_lib = self.compiler.find_library(lib_name, environment, lib_path) + find_lib = self.clib_compiler.find_library(lib_name, environment, lib_path) if not find_lib: raise DependencyException('VULKAN_SDK point to invalid directory (no lib)') @@ -567,8 +567,8 @@ class VulkanDependency(ExternalDependency): return else: # simply try to guess it, usually works on linux - libs = self.compiler.find_library('vulkan', environment, []) - if libs is not None and self.compiler.has_header('vulkan/vulkan.h', '', environment): + libs = self.clib_compiler.find_library('vulkan', environment, []) + if libs is not None and self.clib_compiler.has_header('vulkan/vulkan.h', '', environment): self.type_name = 'system' self.is_found = True self.version = 1 # TODO |