aedi: add quasi-glib target

This commit is contained in:
alexey.lysiuk 2022-12-28 12:47:15 +02:00
parent edabbc6dc0
commit c3f6f15c70
2 changed files with 18 additions and 0 deletions

View file

@ -69,6 +69,7 @@ def targets():
OpenALTarget(),
OpusTarget(),
PcreTarget(),
QuasiGlibTarget(),
SndFileTarget(),
VorbisTarget(),
VpxTarget(),

View file

@ -507,6 +507,23 @@ class PcreTarget(ConfigureMakeStaticDependencyTarget):
self.update_config_script(state.install_path / 'bin/pcre-config')
class QuasiGlibTarget(BuildTarget):
def __init__(self, name='quasi-glib'):
super().__init__(name)
def build(self, state: BuildState):
lib_path = state.install_path / 'lib'
os.makedirs(lib_path, exist_ok=True)
commands = (
(state.cxx_compiler(), '-std=c++11', '-O3', '-c', state.patch_path / f'{self.name}.cpp'),
(state.host() + '-ar', '-crs', lib_path / f'lib{self.name}.a', f'{self.name}.o'),
)
for command in commands:
subprocess.run(command, check=True, cwd=state.build_path, env=state.environment)
class SndFileTarget(CMakeStaticDependencyTarget):
def __init__(self, name='sndfile'):
super().__init__(name)