diff options
author | Dylan Baker <dylan.c.baker@intel.com> | 2022-02-01 12:44:25 -0800 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-02-04 09:08:47 -0800 |
commit | 2f916f2be6ef4f6ffcbcd7edbcee06546d0da519 (patch) | |
tree | 29226b2a570f67d134aac9e0a0805cc06c4ea0ad /meson.build | |
parent | 3abe9ccbd4c397f6be75ab772b35f8452d9dca73 (diff) | |
download | mesa-2f916f2be6ef4f6ffcbcd7edbcee06546d0da519.tar.gz |
meson: add support for `meson devenv` with vulkan
Meson devenv is a feature added in meson 0.58 (thus the features is
version guarded) that allows creating a shell environment with
environment variables automatically setup for running the project inside
the build dir. Some variables (such as LD_LIBRARY_PATH and PATH) are set
automatically, others must be added by the project.
For vulkan is is relativley simple, we create a new, uninstalled, icd
file for each driver and set the VK_ICD_FILENAMES variable
appropriately. This can be used with:
```sh
meson devenv -C $builddir
```
then, vulkan applications will automatically use the uninstall vulkan
driver, no need to install.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14826>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build index bca6b1f5c41..961ca8ecc6b 100644 --- a/meson.build +++ b/meson.build @@ -2167,10 +2167,16 @@ endif # as GCC LTO drops them. See: https://bugs.freedesktop.org/show_bug.cgi?id=109391 gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : [] +devenv = environment() + subdir('include') subdir('bin') subdir('src') +if meson.version().version_compare('>= 0.58') + meson.add_devenv(devenv) +endif + lines = ['', 'prefix: ' + get_option('prefix'), 'libdir: ' + get_option('libdir'), |