Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub fn build(b: *std.Build) !void {
else
linux.build(b, target.result, lib, build_config_h),
.windows => windows.build(b, target.result, lib, build_config_h),
.macos => macos.build(b, target.result, lib, build_config_h),
.macos => macos.build(b, target.result, lib, build_config_h, system_paths),
.ios => ios.build(b, target.result, lib, build_config_h, system_paths),
else => @panic("target has no default config"),
}
Expand Down
11 changes: 5 additions & 6 deletions src/macos.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ const root = @import("../build.zig");
const Subsystems = root.Subsystems;
const AllDrivers = root.Drivers;

pub fn build(
b: *std.Build,
target: std.Target,
lib: *std.Build.Step.Compile,
build_config_h: *std.Build.Step.ConfigHeader,
) void {
pub fn build(b: *std.Build, target: std.Target, lib: *std.Build.Step.Compile, build_config_h: *std.Build.Step.ConfigHeader, paths: root.SystemPaths) void {
_ = target;

const upstream = b.dependency("sdl", .{});

if (paths.include) |p| lib.root_module.addSystemIncludePath(p);
if (paths.framework) |p| lib.root_module.addSystemFrameworkPath(p);
if (paths.library) |p| lib.root_module.addLibraryPath(p);

// Link with the platform specific system frameworks
lib.root_module.linkFramework("Cocoa", .{});
lib.root_module.linkFramework("IOKit", .{});
Expand Down