meson: Build pipe-loader when build-tests is true

Gallium/tests/trivial requires dynamic pipe loader at runtime, that is,
$prefix/$libdir/gallium-pipe/pipe_*.so must get built and installed.
so let's build it if build-tests is enabled.

v2:
- Fix error of meson when both of clover and tests are enabled (dbaker)

Signed-off-by: Luc Ma <luc@sietium.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27180>
This commit is contained in:
Luc Ma 2024-01-20 18:11:48 +08:00 committed by Marge Bot
parent 884397b587
commit 6b5a12611b

View file

@ -174,11 +174,12 @@ if with_gallium_d3d12
else
driver_d3d12 = declare_dependency()
endif
if with_gallium_clover
# TODO: this isn't really clover specific, but ATM clover is the only
# consumer
if with_gallium_clover or with_tests
# At the moment, clover and gallium/tests are the only two consumers
# for pipe-loader
subdir('targets/pipe-loader')
endif
if with_gallium_clover
subdir('frontends/clover')
subdir('targets/opencl')
endif