mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-01-31 12:00:35 +00:00
aedi: patch linker flags in openal cmake module
This commit is contained in:
parent
5cae91d01a
commit
eaa0257b2e
1 changed files with 13 additions and 7 deletions
|
@ -375,16 +375,22 @@ class OpenALTarget(CMakeStaticDependencyTarget):
|
|||
def detect(self, state: BuildState) -> bool:
|
||||
return os.path.exists(state.source + 'openal.pc.in')
|
||||
|
||||
FRAMEWORKS = '-framework ApplicationServices -framework AudioToolbox -framework AudioUnit -framework CoreAudio'
|
||||
|
||||
def post_build(self, state: BuildState):
|
||||
super().post_build(state)
|
||||
|
||||
def update_cmake_libs(line: str):
|
||||
link_libs = ' INTERFACE_LINK_LIBRARIES '
|
||||
return f'{link_libs}"{OpenALTarget.FRAMEWORKS}"\n' if line.startswith(link_libs) else line
|
||||
|
||||
config_path = state.install_path + '/lib/cmake/OpenAL/OpenALConfig.cmake'
|
||||
self.update_text_file(config_path, update_cmake_libs)
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
libs_private = 'Libs.private:'
|
||||
|
||||
if line.startswith(libs_private):
|
||||
# Fix full paths to OS frameworks
|
||||
return libs_private + ' -framework ApplicationServices -framework AudioToolbox'\
|
||||
' -framework AudioUnit -framework CoreAudio' + os.linesep
|
||||
else:
|
||||
return line
|
||||
return f'{libs_private} {OpenALTarget.FRAMEWORKS}\n' if line.startswith(libs_private) else line
|
||||
|
||||
|
||||
class OpusTarget(CMakeStaticDependencyTarget):
|
||||
|
|
Loading…
Reference in a new issue