Fix examples/build.zig for the latest Zig version (#2786)

This commit is contained in:
Roman Akberov 2022-11-02 18:41:21 +01:00 committed by GitHub
parent 4c4a703841
commit 1cb81e3f4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,16 +35,16 @@ fn add_module(comptime module: []const u8, b: *std.build.Builder, target: std.zi
else => @panic("Unsupported OS"), else => @panic("Unsupported OS"),
}); });
exe.addIncludeDir("../src"); exe.addIncludePath("../src");
exe.addIncludeDir("../src/external"); exe.addIncludePath("../src/external");
exe.addIncludeDir("../src/external/glfw/include"); exe.addIncludePath("../src/external/glfw/include");
switch (exe.target.toTarget().os.tag) { switch (exe.target.toTarget().os.tag) {
.windows => { .windows => {
exe.linkSystemLibrary("winmm"); exe.linkSystemLibrary("winmm");
exe.linkSystemLibrary("gdi32"); exe.linkSystemLibrary("gdi32");
exe.linkSystemLibrary("opengl32"); exe.linkSystemLibrary("opengl32");
exe.addIncludeDir("external/glfw/deps/mingw"); exe.addIncludePath("external/glfw/deps/mingw");
}, },
.linux => { .linux => {
exe.linkSystemLibrary("GL"); exe.linkSystemLibrary("GL");