diff options
author | Ryan Neph <ryanneph@google.com> | 2022-03-29 17:02:56 -0700 |
---|---|---|
committer | Ryan Neph <ryanneph@google.com> | 2022-04-04 11:26:04 -0700 |
commit | dedca056655f39b3a5e24b71d4c4242b5cb2c708 (patch) | |
tree | 2d8396d1912e35f46e215bc2cd49f9fb10716b8c /tests | |
parent | 3ae73d99efe30885adfb11f4ea2ced619b08b51f (diff) |
meson: fix builds with percetto tracing
For Percetto builds that don't install to a distributions standard
location, percetto.h cannot be found while building tests or the render
server. Pkgconfig provides the right -I / -L args if meson dependencies
are explicitly provided.
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/775>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/meson.build | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/tests/meson.build b/tests/meson.build index 01649eb..96385bc 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -30,14 +30,20 @@ libvrtest_sources = [ 'testvirgl_encode.h', ] +libvrtest_depends = [ + libvirgl_dep, + gallium_dep, + check_dep, +] + +if with_tracing == 'percetto' + libvrtest_depends += [percetto_dep] +endif + libvrtest = static_library( 'vrtest', libvrtest_sources, - dependencies : [ - libvirgl_dep, - gallium_dep, - check_dep - ] + dependencies : libvrtest_depends ) tests = [ @@ -53,15 +59,34 @@ fuzzy_tests = [ ['test_fuzzer_formats', 'test_fuzzer_formats.c'], ] +test_depends = [ + libvirglrenderer_dep, + check_dep, +] + +if with_tracing == 'percetto' + test_depends += [percetto_dep] +endif + foreach t : tests test_virgl = executable(t[0], t[1], link_with: libvrtest, - dependencies : [libvirglrenderer_dep, check_dep]) + dependencies : test_depends) test(t[0], test_virgl) endforeach + +fuzzytest_depends = [ + libvirglrenderer_dep, + epoxy_dep, +] + +if with_tracing == 'percetto' + fuzzytest_depends += [percetto_dep] +endif + foreach t : fuzzy_tests test_virgl_fuzzy = executable(t[0], t[1], link_with: libvrtest, - dependencies : [libvirglrenderer_dep, epoxy_dep]) + dependencies : fuzzytest_depends) test(t[0], test_virgl) endforeach |