meson: make mesa/tests/glx depend on gallium

If I start direct linking the state tracker to mesa, the tests fail
to build because they don't have gallium linked.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
This commit is contained in:
Dave Airlie 2021-12-07 14:29:29 +10:00 committed by Marge Bot
parent 9bb375b0be
commit b03db92720
3 changed files with 8 additions and 8 deletions

View File

@ -39,7 +39,7 @@ test(
[files_main_test, main_dispatch_h],
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium],
dependencies : [idep_gtest, dep_clock, dep_dl, dep_thread, idep_mesautil],
link_with : [libmesa, link_main_test],
link_with : [libmesa, libgallium, link_main_test],
),
suite : ['mesa'],
protocol : gtest_test_protocol,

View File

@ -580,6 +580,3 @@ libmesa = static_library(
build_by_default : false,
)
if with_tests
subdir('main/tests')
endif

View File

@ -109,23 +109,26 @@ endif
if with_gallium_asahi or with_tools.contains('asahi')
subdir('asahi')
endif
subdir('mesa')
subdir('loader')
if with_platform_haiku
subdir('hgl')
endif
if with_glx == 'dri'
subdir('glx')
endif
if with_gbm
subdir('gbm')
else
inc_gbm = []
endif
if with_gallium
subdir('mesa')
subdir('gallium')
if with_glx == 'dri'
subdir('glx')
endif
# This has to be here since it requires libgallium, and subdir cannot
# contain ..
if with_tests
subdir('mesa/main/tests')
endif
if with_tests and with_shared_glapi
subdir('mesa/state_tracker/tests')
endif