aedi: add fmt target

This commit is contained in:
alexey.lysiuk 2021-06-05 11:57:04 +03:00
parent 5b683aae41
commit d36368a3a0
2 changed files with 18 additions and 0 deletions

View file

@ -68,6 +68,7 @@ def targets():
# Libraries needed for other targets # Libraries needed for other targets
DumbTarget(), DumbTarget(),
FmtTarget(),
FreeTypeTarget(), FreeTypeTarget(),
MadTarget(), MadTarget(),
MikmodTarget(), MikmodTarget(),

View file

@ -61,6 +61,23 @@ class FreeTypeTarget(CMakeStaticDependencyTarget):
return os.path.exists(state.source + 'include/freetype/freetype.h') return os.path.exists(state.source + 'include/freetype/freetype.h')
class FmtTarget(CMakeStaticDependencyTarget):
def __init__(self, name='fmt'):
super().__init__(name)
opts = self.options
opts['FMT_DOC'] = 'NO'
opts['FMT_TEST'] = 'NO'
def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/fmtlib/fmt/archive/refs/tags/7.1.3.tar.gz',
'5cae7072042b3043e12d53d50ef404bbb76949dad1de368d7f993a15c8c05ecc')
def detect(self, state: BuildState) -> bool:
return os.path.exists(state.source + 'include/fmt/format.h')
class MadTarget(ConfigureMakeStaticDependencyTarget): class MadTarget(ConfigureMakeStaticDependencyTarget):
def __init__(self, name='mad'): def __init__(self, name='mad'):
super().__init__(name) super().__init__(name)