Skip to content

Commit

Permalink
Maybe fix on mac?
Browse files Browse the repository at this point in the history
  • Loading branch information
runei committed Aug 14, 2024
1 parent c09ec15 commit bbd1f24
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions 3rdparty/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,16 @@ if 'libvorbis' in autobuild_dependencies:
deps=pa_deps)

elif 'libvorbis' in system_dependencies:
vorbis_prefix = None
# macOS: for mac uses brew install
if meta.platform == 'darwin' and not is_crosscompiling:
env.FindBrewPackage('libogg')
vorbis_prefix = env.FindBrewPackage('libvorbis')

conf = Configure(env, custom_tests=env.CustomTests)

if not conf.AddPkgConfigDependency('vorbis', '--cflags --libs', exclude_from_pc=True):
conf.env.AddManualDependency(libs=['vorbis', 'vorbisenc', 'vorbisfile'], exclude_from_pc=True)
if not conf.AddPkgConfigDependency('vorbis', '--cflags --libs', exclude_from_pc=True, add_prefix=vorbis_prefix):
conf.env.AddManualDependency(libs=['vorbis', 'vorbisenc', 'vorbisfile'], exclude_from_pc=True, prefix=vorbis_prefix)

if not conf.CheckLibWithHeaderExt('vorbis', 'vorbis/vorbisenc.h', 'C', run=False):
env.Die("libvorbis not found (see 'config.log' for details)")
Expand Down

0 comments on commit bbd1f24

Please sign in to comment.