From 2c082c21ec1091885528986f50d745bdc2361c21 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 9 Dec 2020 13:28:14 +0200 Subject: [PATCH] build script: update openal .pc file add link with required frameworks remove useless private libs with full paths to frameworks --- build.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 58f9c3e1..12687c54 100755 --- a/build.py +++ b/build.py @@ -867,7 +867,8 @@ class NinjaTarget(MakeTarget): class OpenALTarget(CMakeStaticDependencyTarget): def __init__(self, name='openal'): super().__init__(name) - + self.pkg_libs = {'openal': '-framework ApplicationServices -framework AudioToolbox ' + '-framework AudioUnit -framework CoreAudio'} opts = self.options opts['ALSOFT_EXAMPLES'] = 'NO' opts['ALSOFT_UTILS'] = 'NO' @@ -880,6 +881,15 @@ class OpenALTarget(CMakeStaticDependencyTarget): def detect(self, builder: 'Builder') -> bool: return os.path.exists(builder.source_path + 'openal.pc.in') + def post_build(self, builder: 'Builder'): + super().post_build(builder) + + def remote_private_libs(line: str): + return None if line.startswith('Libs.private:') else line + + pc_file = builder.deps_path + self.name + os.sep + 'lib/pkgconfig/openal.pc' + Target.update_pc_file(pc_file, processor=remote_private_libs) + class OpusTarget(ConfigureMakeStaticDependencyTarget): def __init__(self, name='opus'):