add doomretro target

This commit is contained in:
alexey.lysiuk 2020-08-11 09:41:18 +03:00
parent c81f11dd16
commit 6c132e1c2e

View file

@ -224,6 +224,43 @@ class CrispyDoomTarget(ChocolateDoomTarget):
self.url = 'https://github.com/fabiangreffrath/crispy-doom.git' self.url = 'https://github.com/fabiangreffrath/crispy-doom.git'
class DoomRetroTarget(Target):
def __init__(self):
super().__init__()
self.name = 'doomretro'
self.url = 'https://github.com/bradharding/doomretro.git'
def configure(self, builder: 'Builder'):
self._assign_common_linker_flags(builder)
extra_linker_args = ' -lc++ -framework Cocoa -framework ForceFeedback -framework IOKit'
extra_libs = (
'mikmod',
'modplug',
'opusfile',
'vorbisfile',
'webp'
)
for lib in extra_libs:
extra_linker_args += f' {builder.lib_path}lib{lib}.a'
sdl2_include_dir = builder.include_path + 'SDL2'
opts = self.cmake_options
opts['SDL2_INCLUDE_DIRS'] = sdl2_include_dir
opts['SDL2_LIBRARIES'] = builder.lib_path + 'libSDL2.a'
opts['SDL2_FOUND'] = 'YES'
opts['SDL2_IMAGE_INCLUDE_DIRS'] = sdl2_include_dir
opts['SDL2_IMAGE_LIBRARIES'] = builder.lib_path + 'libSDL2_image.a'
opts['SDL2_IMAGE_FOUND'] = 'YES'
opts['SDL2_MIXER_INCLUDE_DIRS'] = sdl2_include_dir
opts['SDL2_MIXER_LIBRARIES'] = builder.lib_path + 'libSDL2_mixer.a'
opts['SDL2_MIXER_FOUND'] = 'YES'
opts['CMAKE_EXE_LINKER_FLAGS'] += extra_linker_args
class DevilutionXTarget(Target): class DevilutionXTarget(Target):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
@ -416,6 +453,7 @@ class Builder(object):
PrBoomPlusTarget(), PrBoomPlusTarget(),
ChocolateDoomTarget(), ChocolateDoomTarget(),
CrispyDoomTarget(), CrispyDoomTarget(),
DoomRetroTarget(),
DevilutionXTarget(), DevilutionXTarget(),
) )