Module: Mesa
Branch: main
Commit: fe65c5671b6cee094b9c2d177bc2bfae9729f827
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe65c5671b6cee094b9c2d177bc2bfae9729f827

Author: Dylan Baker <[email protected]>
Date:   Fri Mar 18 14:05:05 2022 -0700

gallium/opencl: set OCL_ICD_FILENAMES with devenv

So that `meson devenv` also sets up OpenCL.

Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15471>

---

 src/gallium/targets/opencl/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/gallium/targets/opencl/meson.build 
b/src/gallium/targets/opencl/meson.build
index ec65fcbe18e..14df6b86f7f 100644
--- a/src/gallium/targets/opencl/meson.build
+++ b/src/gallium/targets/opencl/meson.build
@@ -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

Reply via email to