From d36368a3a09cf343c32095af4193014f795d3f96 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 5 Jun 2021 11:57:04 +0300 Subject: [PATCH] aedi: add fmt target --- aedi/target/__init__.py | 1 + aedi/target/library_tier2.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index 5b361768..e524e100 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -68,6 +68,7 @@ def targets(): # Libraries needed for other targets DumbTarget(), + FmtTarget(), FreeTypeTarget(), MadTarget(), MikmodTarget(), diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index 46100c18..cae795af 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -61,6 +61,23 @@ class FreeTypeTarget(CMakeStaticDependencyTarget): 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): def __init__(self, name='mad'): super().__init__(name)