diff options
| author | Arjan Molenaar <gaphor@gmail.com> | 2025-05-05 11:59:36 +0200 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-05-23 04:03:26 -0400 |
| commit | 2e3845ba4bc3ef33db04e5bcbc3e4a208641f92b (patch) | |
| tree | 8d413334cff3dc1ca7c3bdbc8015aecddb56452e /mesonbuild/dependencies | |
| parent | 25c9f25d49a3db415279b3f5e5317824a12c3f4a (diff) | |
| download | meson-2e3845ba4bc3ef33db04e5bcbc3e4a208641f92b.tar.gz | |
vulkan: Make VK_SDK_PATH optional
VULKAN_SDK is the preferred environment variable to point to
the Vulkan installation. With this change the old variable
(VK_SDK_PATH) is made optional.
Diffstat (limited to 'mesonbuild/dependencies')
| -rw-r--r-- | mesonbuild/dependencies/ui.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index fc44037f1..a310362fa 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -187,12 +187,9 @@ class VulkanDependencySystem(SystemDependency): def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.Any], language: T.Optional[str] = None) -> None: super().__init__(name, environment, kwargs, language=language) - try: - self.vulkan_sdk = os.environ.get('VULKAN_SDK', os.environ['VK_SDK_PATH']) - if not os.path.isabs(self.vulkan_sdk): - raise DependencyException('VULKAN_SDK must be an absolute path.') - except KeyError: - self.vulkan_sdk = None + self.vulkan_sdk = os.environ.get('VULKAN_SDK', os.environ.get('VK_SDK_PATH')) + if self.vulkan_sdk and not os.path.isabs(self.vulkan_sdk): + raise DependencyException('VULKAN_SDK must be an absolute path.') if self.vulkan_sdk: # TODO: this config might not work on some platforms, fix bugs as reported |
