From 236b409502a00e9e52b748d1d1f13e9fb850baa5 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Tue, 8 Oct 2024 09:17:22 -0700 Subject: [PATCH] remove build.zig (no longer needed with latest Zig version) Signed-off-by: Stephen Gutekanst --- build.zig | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 build.zig diff --git a/build.zig b/build.zig deleted file mode 100644 index 2ba4c68a..00000000 --- a/build.zig +++ /dev/null @@ -1,31 +0,0 @@ -const std = @import("std"); - -pub fn build(b: *std.Build) void { - const target = b.standardTargetOptions(.{}); - const optimize = b.standardOptimizeOption(.{}); - - const lib = b.addStaticLibrary(.{ - .name = "xcode-frameworks", - .root_source_file = b.addWriteFiles().add("empty.c", ""), - .target = target, - .optimize = optimize, - }); - addPaths(&lib.root_module); // just for testing - lib.linkLibC(); - lib.installHeadersDirectory(b.path("include"), ".", .{}); - b.installArtifact(lib); -} - -pub fn addPaths(mod: *std.Build.Module) void { - mod.addSystemFrameworkPath(.{ .cwd_relative = sdkPath("/Frameworks") }); - mod.addSystemIncludePath(.{ .cwd_relative = sdkPath("/include") }); - mod.addLibraryPath(.{ .cwd_relative = sdkPath("/lib") }); -} - -fn sdkPath(comptime suffix: []const u8) []const u8 { - if (suffix[0] != '/') @compileError("suffix must be an absolute path"); - return comptime blk: { - const root_dir = std.fs.path.dirname(@src().file) orelse "."; - break :blk root_dir ++ suffix; - }; -}