Skip to content

Commit 22d6feb

Browse files
authored
Merge pull request #1985 from atipls/dev
Update zig bindings to 0.13.0
2 parents 87c0b86 + da9b955 commit 22d6feb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

build.zig

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! License: GNU GENERAL PUBLIC LICENSE Version 2
22

33
const std = @import("std");
4-
const MIN_ZIG_VERSION: []const u8 = "0.12.0";
4+
const MIN_ZIG_VERSION: []const u8 = "0.13.0";
55
const MIN_ZIG_VERSION_ERR_MSG = "Please! Update zig toolchain to >= v" ++ MIN_ZIG_VERSION;
66

77
const SampleFileTypes = enum {
@@ -125,16 +125,14 @@ fn buildExe(b: *std.Build, info: BuildInfo) *std.Build.Step.Compile {
125125
.name = info.filename(),
126126
.target = info.target,
127127
.optimize = info.optimize,
128-
.root_source_file = .{
129-
.path = info.filepath,
130-
},
128+
.root_source_file = b.path(info.filepath),
131129
},
132130
};
133131
const exe = b.addExecutable(execonfig);
134132

135133
if (info.filetype != .zig) {
136134
exe.addCSourceFile(.{
137-
.file = .{ .path = info.filepath },
135+
.file = b.path(info.filepath),
138136
.flags = &.{
139137
"-Wall",
140138
"-Werror",
@@ -144,10 +142,10 @@ fn buildExe(b: *std.Build, info: BuildInfo) *std.Build.Step.Compile {
144142
});
145143

146144
// Ensure the C headers are available
147-
exe.addIncludePath(.{ .path = "include" });
145+
exe.addIncludePath(b.path("include"));
148146

149147
// Ensure the C library is available
150-
exe.addLibraryPath(.{ .path = "build" });
148+
exe.addLibraryPath(b.path("build"));
151149

152150
// linking to OS-LibC or static-linking for:
153151
// Musl(Linux) [e.g: -Dtarget=native-linux-musl]

0 commit comments

Comments
 (0)