sysaudio: remove system_sdk dependency on windows/linux
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
7e7a39b629
commit
6fe196acd7
2 changed files with 9 additions and 1 deletions
|
|
@ -6,5 +6,9 @@
|
|||
.url = "https://github.com/hexops/mach-sysjs/archive/b71eb0531f337fcca5a2b245f595355260109a34.tar.gz",
|
||||
.hash = "12208b30f1d9c229d1e64483354610207c9aa06350a46558560b818d597800ed86e0",
|
||||
},
|
||||
.linux_audio_headers = .{
|
||||
.url = "https://github.com/hexops/linux-audio-headers/archive/d643d20f87e621b4cae1b04a2a112a881334e8b9.tar.gz",
|
||||
.hash = "1220cac816e759824c7f70b6ffd0e6852a33d943b763349421657fd0d8de0587f667",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,12 +48,16 @@ pub fn Sdk(comptime deps: anytype) type {
|
|||
pub fn link(b: *std.Build, step: *std.build.CompileStep, options: Options) void {
|
||||
if (step.target.toTarget().cpu.arch != .wasm32) {
|
||||
// TODO(build-system): pass system SDK options through
|
||||
deps.system_sdk.include(b, step, .{});
|
||||
if (step.target_info.target.os.tag == .macos) deps.system_sdk.include(b, step, .{});
|
||||
if (step.target.toTarget().isDarwin()) {
|
||||
step.linkFramework("AudioToolbox");
|
||||
step.linkFramework("CoreFoundation");
|
||||
step.linkFramework("CoreAudio");
|
||||
} else if (step.target.toTarget().os.tag == .linux) {
|
||||
step.linkLibrary(b.dependency("linux_audio_headers", .{
|
||||
.target = step.target,
|
||||
.optimize = step.optimize,
|
||||
}).artifact("linux-audio-headers"));
|
||||
step.addCSourceFile(sdkPath("/src/pipewire/sysaudio.c"), &.{"-std=gnu99"});
|
||||
step.linkLibC();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue