sysaudio: Add mach-sysjs dependency and prepararation for WebAudio backend
This commit is contained in:
parent
ebc09ee55e
commit
a3b9bb7469
2 changed files with 8 additions and 3 deletions
|
|
@ -1,11 +1,13 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Builder = std.build.Builder;
|
const Builder = std.build.Builder;
|
||||||
|
const sysjs = @import("libs/mach-sysjs/build.zig");
|
||||||
|
|
||||||
const soundio_path = thisDir() ++ "/upstream/soundio";
|
const soundio_path = thisDir() ++ "/upstream/soundio";
|
||||||
|
|
||||||
pub const pkg = std.build.Pkg{
|
pub const pkg = std.build.Pkg{
|
||||||
.name = "sysaudio",
|
.name = "sysaudio",
|
||||||
.source = .{ .path = thisDir() ++ "/src/main.zig" },
|
.source = .{ .path = thisDir() ++ "/src/main.zig" },
|
||||||
|
.dependencies = &.{sysjs.pkg},
|
||||||
};
|
};
|
||||||
|
|
||||||
const soundio_pkg = std.build.Pkg{
|
const soundio_pkg = std.build.Pkg{
|
||||||
|
|
@ -58,9 +60,11 @@ pub fn build(b: *Builder) void {
|
||||||
|
|
||||||
pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
|
pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
|
||||||
_ = options;
|
_ = options;
|
||||||
const soundio_lib = buildSoundIo(b, step);
|
if (step.target.toTarget().cpu.arch != .wasm32) {
|
||||||
step.linkLibrary(soundio_lib);
|
const soundio_lib = buildSoundIo(b, step);
|
||||||
step.addIncludePath(soundio_path);
|
step.linkLibrary(soundio_lib);
|
||||||
|
step.addIncludePath(soundio_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn buildSoundIo(b: *Builder, step: *std.build.LibExeObjStep) *std.build.LibExeObjStep {
|
fn buildSoundIo(b: *Builder, step: *std.build.LibExeObjStep) *std.build.LibExeObjStep {
|
||||||
|
|
|
||||||
1
sysaudio/libs/mach-sysjs
Symbolic link
1
sysaudio/libs/mach-sysjs
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../sysjs
|
||||||
Loading…
Add table
Add a link
Reference in a new issue