From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 4 ----
configure | 1 +
meson.build | 12 +++++++++++-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index b37312f2fb..69105cdfac 100644
--- a/Makefile
+++ b/Makefile
@@ -183,8 +183,6 @@ LIBS+=-lz $(LIBS_TOOLS)
vhost-user-json-y =
HELPERS-y =
-HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
-
ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
endif
@@ -403,8 +401,6 @@ qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
-qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
-
qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS)
diff --git a/configure b/configure
index 78cc3451ad..5a78782c25 100755
--- a/configure
+++ b/configure
@@ -6757,6 +6757,7 @@ if test "$l2tpv3" = "yes" ; then
fi
if test "$cap_ng" = "yes" ; then
echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak
+ echo "LIBCAP_NG_LIBS=$cap_libs" >> $config_host_mak
fi
echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak
for drv in $audio_drv_list; do
diff --git a/meson.build b/meson.build
index 8709847493..79919df761 100644
--- a/meson.build
+++ b/meson.build
@@ -56,6 +56,10 @@ if 'CONFIG_GNUTLS' in config_host
endif
pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
link_args: config_host['PIXMAN_LIBS'].split())
+libcap_ng = declare_dependency()
+if 'CONFIG_LIBCAP_NG' in config_host
+ libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
+endif
rt = cc.find_library('rt', required: false)
libiscsi = declare_dependency()
if 'CONFIG_LIBISCSI' in config_host
@@ -228,7 +232,6 @@ qemuutil = declare_dependency(link_with: libqemuutil,
sources: version_res)
# Other build targets
-
if 'CONFIG_GUEST_AGENT' in config_host
subdir('qga')
endif
@@ -247,6 +250,13 @@ if have_tools
subdir('contrib/vhost-user-scsi')
endif
+ if host_machine.system() == 'linux'
+ executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
+ dependencies: [qemuutil, libcap_ng],
+ install: true,
+ install_dir: get_option('libexecdir'))
+ endif
+
if 'CONFIG_IVSHMEM' in config_host
subdir('contrib/ivshmem-client')
subdir('contrib/ivshmem-server')
--
2.21.0