gallium/opencl: set OCL_ICD_FILENAMES with devenv

So that `meson devenv` also sets up OpenCL.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15471>
This commit is contained in:
Dylan Baker 2022-03-18 14:05:05 -07:00 committed by Marge Bot
parent 19db6b760a
commit fe65c5671b
1 changed files with 8 additions and 0 deletions

View File

@ -114,4 +114,12 @@ if with_opencl_icd
install : true,
install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
)
if meson.version().version_compare('>= 0.58')
# .so is hardcoded in the icd as well
devenv.prepend(
'OCL_ICD_FILENAMES',
meson.current_build_dir() / 'libMesaOpenCL.so.@0@'.format(opencl_version)
)
endif
endif