audio: link against AudioToolbox on macOS (required at least with macOS 12+)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-01 18:56:50 -07:00 committed by Stephen Gutekanst
parent b9dd94698d
commit 39e07df150

View file

@ -86,6 +86,7 @@ fn buildSoundIo(b: *Builder, step: *std.build.LibExeObjStep) *std.build.LibExeOb
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
if (target.isDarwin()) {
lib.addCSourceFile(soundio_path ++ "/src/coreaudio.c", &.{});
lib.linkFramework("AudioToolbox");
lib.linkFramework("CoreFoundation");
lib.linkFramework("CoreAudio");
config_file.writeAll("#define SOUNDIO_HAVE_COREAUDIO\n") catch unreachable;