pkg/macos: start core foundation bindings

This commit is contained in:
Mitchell Hashimoto
2022-09-30 14:03:37 -07:00
parent a3d9dad726
commit ab4491a45d
6 changed files with 92 additions and 0 deletions

24
pkg/macos/build.zig Normal file
View File

@@ -0,0 +1,24 @@
const std = @import("std");
const builtin = @import("builtin");
pub const pkg = std.build.Pkg{
.name = "macos",
.source = .{ .path = thisDir() ++ "/main.zig" },
};
fn thisDir() []const u8 {
return std.fs.path.dirname(@src().file) orelse ".";
}
pub const Options = struct {};
pub fn link(
b: *std.build.Builder,
step: *std.build.LibExeObjStep,
opt: Options,
) !*std.build.LibExeObjStep {
_ = opt;
const lib = b.addStaticLibrary("macos", null);
step.linkFramework("CoreFoundation");
return lib;
}