summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/vhost-user-gpu/meson.build3
-rw-r--r--meson.build5
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/meson.build
index b4e26045da..c8883c2d8e 100644
--- a/contrib/vhost-user-gpu/meson.build
+++ b/contrib/vhost-user-gpu/meson.build
@@ -1,5 +1,4 @@
-if have_tools and virgl.found() and gbm.found() \
- and 'CONFIG_LINUX' in config_host and pixman.found()
+if have_vhost_user_gpu
executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, opengl],
install: true,
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