build script: simplify prboom-plus target

This commit is contained in:
alexey.lysiuk 2020-12-20 10:31:58 +02:00
parent 4b5557ba77
commit 6501805c39

View file

@ -504,27 +504,14 @@ class PrBoomPlusTarget(CMakeTarget):
def prepare_source(self, builder: 'Builder'):
builder.checkout_git('https://github.com/coelckers/prboom-plus.git')
def initialize(self, builder: 'Builder'):
super().initialize(builder)
self._link_with_sound_libraries(builder)
extra_linker_args = ' -framework ForceFeedback -framework IOKit'
extra_libs = (
'mikmod',
'modplug',
'opusfile',
'webp',
)
for lib in extra_libs:
extra_linker_args += f' {builder.lib_path}lib{lib}.a'
def configure(self, builder: 'Builder'):
opts = self.options
opts['CMAKE_C_FLAGS'] = '-D_FILE_OFFSET_BITS=64'
opts['CMAKE_EXE_LINKER_FLAGS'] += extra_linker_args
opts['CMAKE_EXE_LINKER_FLAGS'] = builder.run_pkg_config('--libs', 'SDL2_mixer', 'SDL2_image')
opts['CMAKE_POLICY_DEFAULT_CMP0056'] = 'NEW'
super().configure(builder)
class ChocolateDoomTarget(CMakeTarget):
def __init__(self, name='chocolate-doom'):