mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-21 19:41:15 +00:00
build script: unify *zdoom and raze targets
This commit is contained in:
parent
5f72c3a9e5
commit
8b646f98e5
1 changed files with 17 additions and 25 deletions
42
build.py
42
build.py
|
@ -69,7 +69,12 @@ class Target:
|
|||
|
||||
self.cmake_options['CMAKE_EXE_LINKER_FLAGS'] = linker_args
|
||||
|
||||
def _assign_zdoom_raze_cmake_options(self, builder: 'Builder'):
|
||||
|
||||
class ZDoomBaseTarget(Target):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def configure(self, builder: 'Builder'):
|
||||
self._assign_common_linker_flags(builder)
|
||||
|
||||
opts = self.cmake_options
|
||||
|
@ -81,6 +86,14 @@ class Target:
|
|||
opts['OPENAL_INCLUDE_DIR'] = builder.include_path
|
||||
opts['OPENAL_LIBRARY'] = builder.lib_path + 'libopenal.a'
|
||||
|
||||
|
||||
class GZDoomTarget(ZDoomBaseTarget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.name = 'gzdoom'
|
||||
self.url = 'https://github.com/coelckers/gzdoom.git'
|
||||
self.post_build = GZDoomTarget._copy_moltenvk
|
||||
|
||||
@staticmethod
|
||||
def _copy_moltenvk(builder: 'Builder'):
|
||||
molten_lib = 'libMoltenVK.dylib'
|
||||
|
@ -101,47 +114,26 @@ class Target:
|
|||
copy_func(src_path, dst_path)
|
||||
|
||||
|
||||
class GZDoomTarget(Target):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.name = 'gzdoom'
|
||||
self.url = 'https://github.com/coelckers/gzdoom.git'
|
||||
self.post_build = Target._copy_moltenvk
|
||||
|
||||
def configure(self, builder: 'Builder'):
|
||||
self._assign_zdoom_raze_cmake_options(builder)
|
||||
|
||||
|
||||
class QZDoomTarget(Target):
|
||||
class QZDoomTarget(GZDoomTarget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.name = 'qzdoom'
|
||||
self.url = 'https://github.com/madame-rachelle/qzdoom.git'
|
||||
self.post_build = Target._copy_moltenvk
|
||||
|
||||
def configure(self, builder: 'Builder'):
|
||||
self._assign_zdoom_raze_cmake_options(builder)
|
||||
|
||||
|
||||
class LZDoomTarget(Target):
|
||||
class LZDoomTarget(ZDoomBaseTarget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.name = 'lzdoom'
|
||||
self.url = 'https://github.com/drfrag666/gzdoom.git'
|
||||
|
||||
def configure(self, builder: 'Builder'):
|
||||
self._assign_zdoom_raze_cmake_options(builder)
|
||||
|
||||
|
||||
class RazeTarget(Target):
|
||||
class RazeTarget(ZDoomBaseTarget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.name = 'raze'
|
||||
self.url = 'https://github.com/coelckers/Raze.git'
|
||||
|
||||
def configure(self, builder: 'Builder'):
|
||||
self._assign_zdoom_raze_cmake_options(builder)
|
||||
|
||||
|
||||
class ZandronumTarget(Target):
|
||||
def __init__(self):
|
||||
|
|
Loading…
Reference in a new issue