summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini2021-12-17 12:36:26 +0100
committerPaolo Bonzini2022-02-21 10:35:53 +0100
commit0265fe9e21bb98f7401fd2364c2b57c9adaaa4ff (patch)
treed67a46bc226a8d3c8de63490e43b4aba2408b2ed /meson.build
parentconfigure, meson: move guest-agent, tools to meson (diff)
downloadqemu-0265fe9e21bb98f7401fd2364c2b57c9adaaa4ff.tar.gz
qemu-0265fe9e21bb98f7401fd2364c2b57c9adaaa4ff.tar.xz
qemu-0265fe9e21bb98f7401fd2364c2b57c9adaaa4ff.zip
meson: refine check for whether to look for virglrenderer
The check should be performed even if !have_system, as long as there is some hope that vhost-user-gpu will be built. Store into have_vhost_user_gpu whether vhost-user-gpu will be built; we will also use the variable to decide whether to look for libepoxy. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index b9bedf928a..5ad346816e 100644
--- a/meson.build
+++ b/meson.build
@@ -621,7 +621,9 @@ if not get_option('zstd').auto() or have_block
method: 'pkg-config', kwargs: static_kwargs)
endif
virgl = not_found
-if not get_option('virglrenderer').auto() or have_system
+
+have_vhost_user_gpu = have_tools and targetos == 'linux' and pixman.found()
+if not get_option('virglrenderer').auto() or have_system or have_vhost_user_gpu
virgl = dependency('virglrenderer',
method: 'pkg-config',
required: get_option('virglrenderer'),
@@ -1000,6 +1002,7 @@ if (have_system or have_tools) and (virgl.found() or opengl.found())
gbm = dependency('gbm', method: 'pkg-config', required: false,
kwargs: static_kwargs)
endif
+have_vhost_user_gpu = have_vhost_user_gpu and virgl.found() and gbm.found()
gnutls = not_found
gnutls_crypto = not_found