Skip to content

Commit

Permalink
Update zig build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Oct 12, 2023
1 parent 6468ef2 commit 66af736
Show file tree
Hide file tree
Showing 3 changed files with 344 additions and 326 deletions.
29 changes: 16 additions & 13 deletions build/nuke/Native/SPIRVCross.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,22 @@ pub fn build(b: *std.Build) void {
if (mode != .Debug)
lib.defineCMacro(""NDEBUG"", ""1"");
lib.addCSourceFiles(&.{
root_path ++ ""spirv_cross.cpp"",
root_path ++ ""spirv_cfg.cpp"",
root_path ++ ""spirv_cpp.cpp"",
root_path ++ ""spirv_cross_c.cpp"",
root_path ++ ""spirv_cross_parsed_ir.cpp"",
root_path ++ ""spirv_cross_util.cpp"",
root_path ++ ""spirv_glsl.cpp"",
root_path ++ ""spirv_hlsl.cpp"",
root_path ++ ""spirv_msl.cpp"",
root_path ++ ""spirv_parser.cpp"",
root_path ++ ""spirv_reflect.cpp"",
}, flags);
lib.addCSourceFiles(.{
.files = &.{
root_path ++ ""spirv_cross.cpp"",
root_path ++ ""spirv_cfg.cpp"",
root_path ++ ""spirv_cpp.cpp"",
root_path ++ ""spirv_cross_c.cpp"",
root_path ++ ""spirv_cross_parsed_ir.cpp"",
root_path ++ ""spirv_cross_util.cpp"",
root_path ++ ""spirv_glsl.cpp"",
root_path ++ ""spirv_hlsl.cpp"",
root_path ++ ""spirv_msl.cpp"",
root_path ++ ""spirv_parser.cpp"",
root_path ++ ""spirv_reflect.cpp"",
},
.flags = flags
});
b.installArtifact(lib);
}
Expand Down
2 changes: 1 addition & 1 deletion build/nuke/Native/SPIRVReflect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn build(b: *std.Build) void {
const lib: *std.build.LibExeObjStep = b.addSharedLibrary(shared_lib_options);
lib.linkLibC();
lib.addCSourceFiles(&.{""spirv_reflect.c""}, &.{ ""-std=c99"", ""-fPIC"" });
lib.addCSourceFiles(.{ .files = &.{""spirv_reflect.c""}, .flags = &.{ ""-std=c99"", ""-fPIC"" } });
b.installArtifact(lib);
}";

Expand Down
Loading

0 comments on commit 66af736

Please sign in to comment.