Module: Mesa Branch: main Commit: 5e994c5d983986788c18f2b87a3ee80e4c3f5936 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e994c5d983986788c18f2b87a3ee80e4c3f5936
Author: Dylan Baker <[email protected]> Date: Tue Feb 1 13:23:23 2022 -0800 meson: add LIBGL_DRIVERS_PATH to the devenv This allows using built dri OpenGL drivers with the `meson devenv` command Reviewed-by: Adam Jackson <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14826> --- src/gallium/targets/dri/meson.build | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index d066ce60950..4733f439e49 100644 --- a/src/gallium/targets/dri/meson.build +++ b/src/gallium/targets/dri/meson.build @@ -118,6 +118,24 @@ foreach d : [[with_gallium_kmsro, [ endif endforeach +if meson.version().version_compare('>= 0.58') + # This only works on Unix-like oses, which is probably fine for dri + prog_ln = find_program('ln', required : false) + if prog_ln.found() + devenv.set('LIBGL_DRIVERS_PATH', meson.current_build_dir()) + + foreach d : gallium_dri_drivers + custom_target( + 'devenv_@0@'.format(d), + input : libgallium_dri, + output : d, + command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'], + build_by_default : true, + ) + endforeach + endif +endif + meson.add_install_script( install_megadrivers_py.path(), libgallium_dri.full_path(),
