From 62db2ef5d29ffc9ecd58feb06cd70f2bf9654c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20C=2E=20Fran=C3=A7a?= Date: Mon, 31 Jul 2023 16:45:25 -0300 Subject: [PATCH] build change ref.: https://github.com/ziglang/zig/pull/16446 --- src/build.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/build.zig b/src/build.zig index 64480a4f10fe..28a5d727d25b 100644 --- a/src/build.zig +++ b/src/build.zig @@ -18,7 +18,7 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built // No GLFW required on PLATFORM_DRM if (!options.platform_drm) { - raylib.addIncludePath(srcdir ++ "/external/glfw/include"); + raylib.addIncludePath(.{ .path = srcdir ++ "/external/glfw/include" }); } raylib.addCSourceFiles(&.{ @@ -36,9 +36,9 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built if (options.raygui) { _ = gen_step.add(srcdir ++ "/raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n"); - raylib.addCSourceFile(srcdir ++ "/raygui.c", raylib_flags); - raylib.addIncludePath(srcdir); - raylib.addIncludePath(srcdir ++ "/../../raygui/src"); + raylib.addCSourceFile(.{ .file = .{ .path = srcdir ++ "/raygui.c" }, .flags = raylib_flags }); + raylib.addIncludePath(.{ .path = srcdir }); + raylib.addIncludePath(.{ .path = srcdir ++ "/../../raygui/src" }); } switch (target.getOsTag()) { @@ -47,7 +47,7 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built raylib.linkSystemLibrary("winmm"); raylib.linkSystemLibrary("gdi32"); raylib.linkSystemLibrary("opengl32"); - raylib.addIncludePath("external/glfw/deps/mingw"); + raylib.addIncludePath(.{ .path = "external/glfw/deps/mingw" }); raylib.defineCMacro("PLATFORM_DESKTOP", null); }, @@ -59,7 +59,7 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built raylib.linkSystemLibrary("dl"); raylib.linkSystemLibrary("m"); raylib.linkSystemLibrary("X11"); - raylib.addIncludePath("/usr/include"); + raylib.addIncludePath(.{ .path = "/usr/include" }); raylib.defineCMacro("PLATFORM_DESKTOP", null); } else { @@ -71,7 +71,7 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built raylib.linkSystemLibrary("rt"); raylib.linkSystemLibrary("m"); raylib.linkSystemLibrary("dl"); - raylib.addIncludePath("/usr/include/libdrm"); + raylib.addIncludePath(.{ .path = "/usr/include/libdrm" }); raylib.defineCMacro("PLATFORM_DRM", null); raylib.defineCMacro("GRAPHICS_API_OPENGL_ES2", null); @@ -125,7 +125,7 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built var dir = std.fs.openDirAbsolute(cache_include, std.fs.Dir.OpenDirOptions{ .access_sub_paths = true, .no_follow = true }) catch @panic("No emscripten cache. Generate it!"); dir.close(); - raylib.addIncludePath(cache_include); + raylib.addIncludePath(.{ .path = cache_include }); }, else => { @panic("Unsupported OS");