1if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
2    and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host \
3    and pixman.found()
4  executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
5             link_with: libvhost_user,
6             dependencies: [qemuutil, pixman, gbm, virgl],
7             install: true,
8             install_dir: get_option('libexecdir'))
9
10  configure_file(input: '50-qemu-gpu.json.in',
11                 output: '50-qemu-gpu.json',
12                 configuration: config_host,
13                 install_dir: config_host['qemu_datadir'] / 'vhost-user')
14endif
15