mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
build script: finalize cross-compilation of prboom+
This commit is contained in:
parent
a22a30abc0
commit
e7abec9759
1 changed files with 11 additions and 3 deletions
14
build.py
14
build.py
|
@ -484,6 +484,14 @@ class CMakeOutputTarget(CMakeTarget):
|
|||
copy_func = shutil.copytree if os.path.isdir(src) else shutil.copy
|
||||
copy_func(src, dst)
|
||||
|
||||
def _force_cross_compilation(self, builder: 'Builder'):
|
||||
if builder.architecture() == machine():
|
||||
return
|
||||
|
||||
opts = self.options
|
||||
opts['FORCE_CROSSCOMPILE'] = 'YES'
|
||||
opts['IMPORT_EXECUTABLES'] = builder.native_build_path + 'ImportExecutables.cmake'
|
||||
|
||||
|
||||
class ZDoomBaseTarget(CMakeOutputTarget):
|
||||
def __init__(self, name=None):
|
||||
|
@ -498,9 +506,7 @@ class ZDoomBaseTarget(CMakeOutputTarget):
|
|||
opts['OPENAL_INCLUDE_DIR'] = builder.include_path + 'AL'
|
||||
opts['OPENAL_LIBRARY'] = builder.lib_path + 'libopenal.a'
|
||||
|
||||
if builder.architecture() != machine():
|
||||
opts['FORCE_CROSSCOMPILE'] = 'YES'
|
||||
opts['IMPORT_EXECUTABLES'] = builder.native_build_path + 'ImportExecutables.cmake'
|
||||
self._force_cross_compilation(builder)
|
||||
|
||||
super().configure(builder)
|
||||
|
||||
|
@ -590,6 +596,8 @@ class PrBoomPlusTarget(CMakeOutputTarget):
|
|||
opts['CMAKE_EXE_LINKER_FLAGS'] = builder.run_pkg_config('--libs', 'SDL2_mixer', 'SDL2_image')
|
||||
opts['CMAKE_POLICY_DEFAULT_CMP0056'] = 'NEW'
|
||||
|
||||
self._force_cross_compilation(builder)
|
||||
|
||||
super().configure(builder)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue