diff --git a/src/mesa/main/tests/meson.build b/src/mesa/main/tests/meson.build index ce924251cc1..47ad17af343 100644 --- a/src/mesa/main/tests/meson.build +++ b/src/mesa/main/tests/meson.build @@ -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, diff --git a/src/mesa/meson.build b/src/mesa/meson.build index aef1f8fdc46..3774092527a 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -580,6 +580,3 @@ libmesa = static_library( build_by_default : false, ) -if with_tests - subdir('main/tests') -endif diff --git a/src/meson.build b/src/meson.build index 5bfa89b4825..7cbbf74af78 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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