Skip to content

Commit 7e7d4ba

Browse files
committed
vulkan: Test Vulkan version in SDK path
This change ensures that Vulkan will be found in the path defined by the VULKAN_SDK env var. This is the case when the Vulkan SDK is not installed in a well-known location (/usr, /usr/local), but in a user's home folder.
1 parent 2480a7e commit 7e7d4ba

File tree

1 file changed

+3
-1
lines changed
  • mesonbuild/dependencies

1 file changed

+3
-1
lines changed

mesonbuild/dependencies/ui.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.
191191
if self.vulkan_sdk and not os.path.isabs(self.vulkan_sdk):
192192
raise DependencyException('VULKAN_SDK must be an absolute path.')
193193

194+
extra_args = []
194195
if self.vulkan_sdk:
195196
# TODO: this config might not work on some platforms, fix bugs as reported
196197
# we should at least detect other 64-bit platforms (e.g. armv8)
@@ -219,6 +220,7 @@ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.
219220
# XXX: this is very odd, and may deserve being removed
220221
self.type_name = DependencyTypeName('vulkan_sdk')
221222
self.is_found = True
223+
extra_args = ['-I' + inc_path]
222224
self.compile_args.append('-I' + inc_path)
223225
self.link_args.append('-L' + lib_path)
224226
self.link_args.append('-l' + lib_name)
@@ -239,7 +241,7 @@ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.
239241
low=0, high=None, guess=e,
240242
prefix='#include <vulkan/vulkan.h>',
241243
env=environment,
242-
extra_args=None,
244+
extra_args=extra_args,
243245
dependencies=None))
244246
# list containing vulkan version components and their expected value
245247
for c, e in [('MAJOR', 1), ('MINOR', 3), ('PATCH', None)]]

0 commit comments

Comments
 (0)