build script: add devilutionx target

This commit is contained in:
alexey.lysiuk 2020-06-14 11:27:32 +03:00
parent 5e7db73a69
commit afda517519

View file

@ -218,6 +218,33 @@ class CrispyDoomTarget(ChocolateDoomTarget):
self.url = 'https://github.com/fabiangreffrath/crispy-doom.git'
class DevilutionXTarget(Target):
def __init__(self):
super().__init__()
self.name = 'devilutionx'
self.url = 'https://github.com/diasurgical/devilutionX.git'
def configure(self, builder: 'Builder'):
self._assign_common_linker_flags(builder)
extra_linker_args = ' -lbz2 -lz -framework Cocoa -framework ForceFeedback -framework IOKit'
extra_libs = (
'freetype',
'mikmod',
'modplug',
'opusfile',
'png',
'vorbisfile',
)
for lib in extra_libs:
extra_linker_args += f' {builder.lib_path}lib{lib}.a'
opts = self.cmake_options
opts['CMAKE_EXE_LINKER_FLAGS'] += extra_linker_args
class Builder(object):
def __init__(self, args: list):
self._create_targets()
@ -368,6 +395,7 @@ class Builder(object):
PrBoomPlusTarget(),
ChocolateDoomTarget(),
CrispyDoomTarget(),
DevilutionXTarget(),
)
self.targets = {target.name: target for target in targets}