diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-20 17:34:06 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-05-07 07:46:58 +0200 |
commit | 43b6d7ee1fbc5b5fb7c85d8131fdac1863214ad6 (patch) | |
tree | 10d919c4e49f279d006691ed7201a8f921082f98 /net/meson.build | |
parent | 2a3129a37652e5e81d12f6e16dd3c447f09831f9 (diff) |
meson: use have_vhost_* variables to pick sources
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'net/meson.build')
-rw-r--r-- | net/meson.build | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/meson.build b/net/meson.build index 847bc2ac85..c965e83b26 100644 --- a/net/meson.build +++ b/net/meson.build @@ -26,10 +26,10 @@ softmmu_ss.add(when: vde, if_true: files('vde.c')) if have_netmap softmmu_ss.add(files('netmap.c')) endif -vhost_user_ss = ss.source_set() -vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c')) -softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss) -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) +if have_vhost_net_user + softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c')) + softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) +endif softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c')) softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c')) @@ -40,6 +40,8 @@ if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_B endif softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix)) softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c')) -softmmu_ss.add(when: 'CONFIG_VHOST_NET_VDPA', if_true: files('vhost-vdpa.c')) +if have_vhost_net_vdpa + softmmu_ss.add(files('vhost-vdpa.c')) +endif subdir('can') |