aedi: add quasi-glib option

This commit is contained in:
alexey.lysiuk 2022-12-27 12:30:19 +02:00
parent 9fb45ecb68
commit 22a0f4033a
3 changed files with 13 additions and 1 deletions

View file

@ -91,6 +91,7 @@ class Builder(object):
self._environment = state.environment
state.static_moltenvk = arguments.static_moltenvk
state.quasi_glib = arguments.quasi_glib
state.jobs = arguments.jobs and arguments.jobs or self._get_default_job_count()
def _get_default_job_count(self):
@ -345,5 +346,6 @@ class Builder(object):
group = parser.add_argument_group('Hacks')
group.add_argument('--static-moltenvk', action='store_true', help='link with static MoltenVK library')
group.add_argument('--quasi-glib', action='store_true', help='link with QuasiGlib library')
return parser.parse_args(args)

View file

@ -55,7 +55,9 @@ class BuildState:
self.xcode = False
self.verbose = False
self.jobs = 1
self.static_moltenvk = False
self.quasi_glib = False
self.environment = os.environ.copy()
self.options = CommandLineOptions()

View file

@ -86,8 +86,16 @@ class ZDoomBaseTarget(CMakeMainTarget):
super().__init__(name)
def configure(self, state: BuildState):
pkg_config_args = ['--libs', 'openal', 'sndfile']
linker_flags = ''
if state.quasi_glib:
linker_flags = '-lquasi-glib '
else:
pkg_config_args.append('glib-2.0')
opts = state.options
opts['CMAKE_EXE_LINKER_FLAGS'] += state.run_pkg_config('--libs', 'glib-2.0', 'libmpg123', 'openal', 'sndfile')
opts['CMAKE_EXE_LINKER_FLAGS'] += linker_flags + state.run_pkg_config(*pkg_config_args)
opts['PK3_QUIET_ZIPDIR'] = 'YES'
opts['DYN_OPENAL'] = 'NO'