mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-10 14:41:43 +00:00
aedi: add quasi-glib target
This commit is contained in:
parent
edabbc6dc0
commit
c3f6f15c70
2 changed files with 18 additions and 0 deletions
|
@ -69,6 +69,7 @@ def targets():
|
|||
OpenALTarget(),
|
||||
OpusTarget(),
|
||||
PcreTarget(),
|
||||
QuasiGlibTarget(),
|
||||
SndFileTarget(),
|
||||
VorbisTarget(),
|
||||
VpxTarget(),
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue