1
1
//! License: GNU GENERAL PUBLIC LICENSE Version 2
2
2
3
3
const std = @import ("std" );
4
- const MIN_ZIG_VERSION : []const u8 = "0.12 .0" ;
4
+ const MIN_ZIG_VERSION : []const u8 = "0.13 .0" ;
5
5
const MIN_ZIG_VERSION_ERR_MSG = "Please! Update zig toolchain to >= v" ++ MIN_ZIG_VERSION ;
6
6
7
7
const SampleFileTypes = enum {
@@ -125,16 +125,14 @@ fn buildExe(b: *std.Build, info: BuildInfo) *std.Build.Step.Compile {
125
125
.name = info .filename (),
126
126
.target = info .target ,
127
127
.optimize = info .optimize ,
128
- .root_source_file = .{
129
- .path = info .filepath ,
130
- },
128
+ .root_source_file = b .path (info .filepath ),
131
129
},
132
130
};
133
131
const exe = b .addExecutable (execonfig );
134
132
135
133
if (info .filetype != .zig ) {
136
134
exe .addCSourceFile (.{
137
- .file = .{ . path = info .filepath } ,
135
+ .file = b . path ( info .filepath ) ,
138
136
.flags = &.{
139
137
"-Wall" ,
140
138
"-Werror" ,
@@ -144,10 +142,10 @@ fn buildExe(b: *std.Build, info: BuildInfo) *std.Build.Step.Compile {
144
142
});
145
143
146
144
// Ensure the C headers are available
147
- exe .addIncludePath (.{ . path = "include" } );
145
+ exe .addIncludePath (b . path ( "include" ) );
148
146
149
147
// Ensure the C library is available
150
- exe .addLibraryPath (.{ . path = "build" } );
148
+ exe .addLibraryPath (b . path ( "build" ) );
151
149
152
150
// linking to OS-LibC or static-linking for:
153
151
// Musl(Linux) [e.g: -Dtarget=native-linux-musl]
0 commit comments