{sysjs,mach}: correctly pass sysjs dependency to sdk

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-09-09 21:55:38 -07:00
parent f1ae31ae86
commit 2ba7e48ac2
3 changed files with 4 additions and 2 deletions

View file

@ -22,6 +22,7 @@ const gpu = gpu_sdk.Sdk(.{
});
const sysaudio = sysaudio_sdk.Sdk(.{
.system_sdk = system_sdk,
.sysjs = sysjs,
});
pub fn build(b: *std.build.Builder) void {

View file

@ -1,12 +1,14 @@
const std = @import("std");
const sysaudio_sdk = @import("sdk.zig");
const system_sdk = @import("libs/mach-glfw/system_sdk.zig");
const sysjs = @import("libs/mach-sysjs/build.zig");
pub fn build(b: *std.build.Builder) void {
const mode = b.standardReleaseOptions();
const target = b.standardTargetOptions(.{});
const sysaudio = sysaudio_sdk.Sdk(.{
.system_sdk = system_sdk,
.sysjs = sysjs,
});
const test_step = b.step("test", "Run library tests");

View file

@ -1,5 +1,4 @@
const std = @import("std");
const sysjs = @import("libs/mach-sysjs/build.zig");
pub fn Sdk(comptime deps: anytype) type {
return struct {
@ -8,7 +7,7 @@ pub fn Sdk(comptime deps: anytype) type {
pub const pkg = std.build.Pkg{
.name = "sysaudio",
.source = .{ .path = thisDir() ++ "/src/main.zig" },
.dependencies = &.{ sysjs.pkg, soundio_pkg },
.dependencies = &.{ deps.sysjs.pkg, soundio_pkg },
};
pub const soundio_pkg = std.build.Pkg{