sysaudio: replace system_sdk with xcode-frameworks
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
4142930bde
commit
cfe85f915a
3 changed files with 13 additions and 8 deletions
|
|
@ -1,12 +1,13 @@
|
|||
const std = @import("std");
|
||||
const sysaudio_sdk = @import("sdk.zig");
|
||||
const system_sdk = @import("libs/mach-glfw/system_sdk.zig");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const sysaudio = sysaudio_sdk.Sdk(.{
|
||||
.system_sdk = system_sdk,
|
||||
// TODO(build-system): This cannot be imported with the Zig package manager
|
||||
// error: TarUnsupportedFileType
|
||||
.xcode_frameworks = @import("libs/xcode-frameworks//build.zig"),
|
||||
});
|
||||
|
||||
const test_step = b.step("test", "Run library tests");
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../../glfw
|
||||
|
|
@ -4,9 +4,6 @@ pub fn Sdk(comptime deps: anytype) type {
|
|||
return struct {
|
||||
pub const Options = struct {
|
||||
install_libs: bool = false,
|
||||
|
||||
/// System SDK options.
|
||||
system_sdk: deps.system_sdk.Options = .{},
|
||||
};
|
||||
|
||||
var _module: ?*std.build.Module = null;
|
||||
|
|
@ -47,9 +44,17 @@ 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
|
||||
if (step.target_info.target.os.tag == .macos) deps.system_sdk.include(b, step, .{});
|
||||
if (step.target.toTarget().isDarwin()) {
|
||||
// TODO(build-system): This cannot be imported with the Zig package manager
|
||||
// error: TarUnsupportedFileType
|
||||
//
|
||||
// step.linkLibrary(b.dependency("xcode_frameworks", .{
|
||||
// .target = step.target,
|
||||
// .optimize = step.optimize,
|
||||
// }).artifact("xcode-frameworks"));
|
||||
// @import("xcode_frameworks").addPaths(step);
|
||||
deps.xcode_frameworks.addPaths(step);
|
||||
|
||||
step.linkFramework("AudioToolbox");
|
||||
step.linkFramework("CoreFoundation");
|
||||
step.linkFramework("CoreAudio");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue