Skip to content

Commit

Permalink
update for zig-0.12.0-dev.890+8c6b0271c
Browse files Browse the repository at this point in the history
  • Loading branch information
dolichomps authored and slimsag committed Oct 17, 2023
1 parent 2dcd1e1 commit 2748aff
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
25 changes: 20 additions & 5 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ pub fn build(b: *std.Build) void {
}

const flags = [_][]const u8{ "-D_GLFW_WIN32", include_src_flag };
lib.addCSourceFiles(&base_sources, &flags);
lib.addCSourceFiles(&windows_sources, &flags);
lib.addCSourceFiles(.{
.files = &base_sources,
.flags = &flags,
});
lib.addCSourceFiles(.{
.files = &windows_sources,
.flags = &flags,
});
},
.macos => {
lib.linkSystemLibraryName("objc");
Expand All @@ -80,8 +86,14 @@ pub fn build(b: *std.Build) void {
}

const flags = [_][]const u8{ "-D_GLFW_COCOA", include_src_flag };
lib.addCSourceFiles(&base_sources, &flags);
lib.addCSourceFiles(&macos_sources, &flags);
lib.addCSourceFiles(.{
.files = &base_sources,
.flags = &flags,
});
lib.addCSourceFiles(.{
.files = &macos_sources,
.flags = &flags,
});
},

// everything that isn't windows or mac is linux :P
Expand Down Expand Up @@ -117,7 +129,10 @@ pub fn build(b: *std.Build) void {

flags.append(include_src_flag) catch unreachable;

lib.addCSourceFiles(sources.slice(), flags.slice());
lib.addCSourceFiles(.{
.files = sources.slice(),
.flags = flags.slice(),
});
},
}
b.installArtifact(lib);
Expand Down
13 changes: 13 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
.{
.name = "glfw",
.version = "0.0.0",
.paths = .{
"src/",
"include/",
"build.zig",
"build.zig.zon",
"LICENSE.md",
"README.md",
"CONTRIBUTORS.md",
".gitignore",
".gitattributes",
"update.sh",
"verify.sh",
},
.dependencies = .{
.xcode_frameworks = .{
.url = "https://github.com/hexops/xcode-frameworks-pkg/archive/f8b854f9a1f4b4602b4f998ee42588d524d44e52.tar.gz",
Expand Down

0 comments on commit 2748aff

Please sign in to comment.