aedi: add yquake2 target (without expansions libraries)

This commit is contained in:
alexey.lysiuk 2021-12-11 16:02:08 +02:00
parent b925931fde
commit 83721434f6
2 changed files with 21 additions and 0 deletions

View file

@ -44,6 +44,7 @@ def targets():
EDuke32Target(),
NBloodTarget(),
QuakespasmTarget(),
YQuake2Target(),
# Libraries needed for GZDoom and Raze
Bzip2Target(),

View file

@ -386,3 +386,23 @@ class QuakespasmTarget(MakeMainTarget):
opts['USE_CODEC_UMX'] = '1'
# Add main() alias to workaround executable linking without macOS launcher
opts['COMMON_LIBS'] = '-framework OpenGL -Wl,-alias -Wl,_SDL_main -Wl,_main'
class YQuake2Target(CMakeMainTarget):
def __init__(self, name='yquake2'):
super().__init__(name)
def prepare_source(self, state: BuildState):
state.checkout_git('https://github.com/yquake2/yquake2.git')
def configure(self, state: BuildState):
opts = state.options
opts['SDL2_LIBRARY'] = state.run_pkg_config('--libs', 'SDL2')
# Explicit OpenAL configuration to avoid selection of Apple's framework
opts['OPENAL_INCLUDE_DIR'] = state.include_path / 'AL'
opts['OPENAL_LIBRARY'] = state.lib_path / 'libopenal.a'
super().configure(state)
def post_build(self, state: BuildState):
shutil.copytree(state.build_path / 'release', state.install_path, dirs_exist_ok=True)