aedi: add usb target to library tier 3

This commit is contained in:
alexey.lysiuk 2024-09-14 13:22:52 +03:00
parent 33ffd40d9f
commit dae03acd0b
2 changed files with 14 additions and 0 deletions

View file

@ -112,6 +112,7 @@ def targets():
Sdl2TtfTarget(), Sdl2TtfTarget(),
SfmlTarget(), SfmlTarget(),
TiffTarget(), TiffTarget(),
UsbTarget(),
WxWidgetsTarget(), WxWidgetsTarget(),
ZstdTarget(), ZstdTarget(),

View file

@ -367,6 +367,19 @@ class TiffTarget(base.CMakeStaticDependencyTarget):
return line return line
class UsbTarget(base.ConfigureMakeStaticDependencyTarget):
def __init__(self, name='usb'):
super().__init__(name)
def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.tar.bz2',
'ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575')
def detect(self, state: BuildState) -> bool:
return state.has_source_file('libusb/libusb.h')
class WxWidgetsTarget(base.CMakeStaticDependencyTarget): class WxWidgetsTarget(base.CMakeStaticDependencyTarget):
def __init__(self, name='wxwidgets'): def __init__(self, name='wxwidgets'):
super().__init__(name) super().__init__(name)