Change std.build.Pkg.path -> std.build.Pkg.source

Fixes breaking change in latest Zig master, see https://github.com/ziglang/zig/pull/11557
This commit is contained in:
kamidev 2022-05-27 15:47:44 +02:00 committed by Stephen Gutekanst
parent f2ab1eb069
commit 68190e863a
4 changed files with 8 additions and 8 deletions

View file

@ -118,11 +118,11 @@ const Packages = struct {
// Declared here because submodule may not be cloned at the time build.zig runs. // Declared here because submodule may not be cloned at the time build.zig runs.
const zmath = std.build.Pkg{ const zmath = std.build.Pkg{
.name = "zmath", .name = "zmath",
.path = .{ .path = "examples/libs/zmath/src/zmath.zig" }, .source = .{ .path = "examples/libs/zmath/src/zmath.zig" },
}; };
const zigimg = std.build.Pkg{ const zigimg = std.build.Pkg{
.name = "zigimg", .name = "zigimg",
.path = .{ .path = "examples/libs/zigimg/zigimg.zig" }, .source = .{ .path = "examples/libs/zigimg/zigimg.zig" },
}; };
}; };
@ -147,7 +147,7 @@ pub const App = struct {
const app_pkg = std.build.Pkg{ const app_pkg = std.build.Pkg{
.name = "app", .name = "app",
.path = .{ .path = options.src }, .source = .{ .path = options.src },
.dependencies = deps, .dependencies = deps,
}; };
@ -231,7 +231,7 @@ pub const App = struct {
const http_server = app.b.addExecutable("http-server", thisDir() ++ "/tools/http-server.zig"); const http_server = app.b.addExecutable("http-server", thisDir() ++ "/tools/http-server.zig");
http_server.addPackage(.{ http_server.addPackage(.{
.name = "apple_pie", .name = "apple_pie",
.path = .{ .path = "tools/libs/apple_pie/src/apple_pie.zig" }, .source = .{ .path = "tools/libs/apple_pie/src/apple_pie.zig" },
}); });
// NOTE: The launch actually takes place in reverse order. The browser is launched first // NOTE: The launch actually takes place in reverse order. The browser is launched first
@ -265,7 +265,7 @@ pub const App = struct {
pub const pkg = std.build.Pkg{ pub const pkg = std.build.Pkg{
.name = "mach", .name = "mach",
.path = .{ .path = thisDir() ++ "/src/main.zig" }, .source = .{ .path = thisDir() ++ "/src/main.zig" },
.dependencies = &.{gpu.pkg}, .dependencies = &.{gpu.pkg},
}; };

View file

@ -54,7 +54,7 @@ pub const Options = struct {
pub const pkg = std.build.Pkg{ pub const pkg = std.build.Pkg{
.name = "freetype", .name = "freetype",
.path = .{ .path = thisDir() ++ "/src/main.zig" }, .source = .{ .path = thisDir() ++ "/src/main.zig" },
}; };
pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void { pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {

View file

@ -43,7 +43,7 @@ pub const Options = struct {
pub const pkg = std.build.Pkg{ pub const pkg = std.build.Pkg{
.name = "glfw", .name = "glfw",
.path = .{ .path = thisDir() ++ "/src/main.zig" }, .source = .{ .path = thisDir() ++ "/src/main.zig" },
}; };
pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void { pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {

View file

@ -40,7 +40,7 @@ pub const Options = struct {
pub const pkg = std.build.Pkg{ pub const pkg = std.build.Pkg{
.name = "gpu", .name = "gpu",
.path = .{ .path = thisDir() ++ "/src/main.zig" }, .source = .{ .path = thisDir() ++ "/src/main.zig" },
.dependencies = &.{glfw.pkg}, .dependencies = &.{glfw.pkg},
}; };