package/qemu: use libusb (for usb passthrough) if it's selected
authorCarlos Santos <unixmania@gmail.com>
Fri, 25 Oct 2019 18:28:52 +0000 (15:28 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 25 Oct 2019 19:37:19 +0000 (21:37 +0200)
This allows sharing a host USB port with the guest, which is helpful for
the upcoming libvirt package.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/qemu/qemu.mk

index 3c8b0f43d8529445d06ea62774392acd161f0918..4e39fce8a696f08f82a8fa7fb95e7dde9e4545cc 100644 (file)
@@ -97,6 +97,13 @@ else
 QEMU_OPTS += --disable-libssh2
 endif
 
+ifeq ($(BR2_PACKAGE_LIBUSB),y)
+QEMU_OPTS += --enable-libusb
+QEMU_DEPENDENCIES += libusb
+else
+QEMU_OPTS += --disable-libusb
+endif
+
 ifeq ($(BR2_PACKAGE_NETTLE),y)
 QEMU_OPTS += --enable-nettle
 QEMU_DEPENDENCIES += nettle