usb: build usb-host as module
Drop one more shared library dependency (libusb) from core qemu. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-34-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
f1a74bf976
commit
627302afb2
@ -1777,6 +1777,7 @@ static TypeInfo usb_host_dev_info = {
|
||||
.class_init = usb_host_class_initfn,
|
||||
.instance_init = usb_host_instance_init,
|
||||
};
|
||||
module_obj(TYPE_USB_HOST_DEVICE);
|
||||
|
||||
static void usb_host_register_types(void)
|
||||
{
|
||||
|
@ -72,8 +72,12 @@ if usbredir.found()
|
||||
endif
|
||||
|
||||
# usb pass-through
|
||||
softmmu_ss.add(when: ['CONFIG_USB', libusb],
|
||||
if_true: files('host-libusb.c'))
|
||||
if config_host.has_key('CONFIG_USB_LIBUSB')
|
||||
usbhost_ss = ss.source_set()
|
||||
usbhost_ss.add(when: ['CONFIG_USB', libusb],
|
||||
if_true: files('host-libusb.c'))
|
||||
hw_usb_modules += {'host': usbhost_ss}
|
||||
endif
|
||||
|
||||
softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true: files('xen-usb.c'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user