From c0f1085c786179d4248111312ac15dc6676e8be1 Mon Sep 17 00:00:00 2001 From: Pablo Alessandro Santos Hugen Date: Thu, 2 Jan 2025 16:41:41 -0300 Subject: [PATCH] Chore: Fix std.Build deprecated APIs and bump zig master (#10) --- .zigversion | 2 +- build.zig | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.zigversion b/.zigversion index 867eba6..cea483f 100644 --- a/.zigversion +++ b/.zigversion @@ -1 +1 @@ -0.14.0-dev.1911+3bf89f55c \ No newline at end of file +0.14.0-dev.2563+af5e73172 diff --git a/build.zig b/build.zig index 980777c..30c7a2a 100644 --- a/build.zig +++ b/build.zig @@ -45,7 +45,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); if (target.result.os.tag == .windows) { - lib.defineCMacro("_GLFW_BUILD_DLL", null); + lib.root_module.addCMacro("_GLFW_BUILD_DLL", ""); } break :blk lib; } else b.addStaticLibrary(.{ @@ -188,7 +188,7 @@ pub fn build(b: *std.Build) void { }, .flags = &.{}, }); - glfw.defineCMacro("_GLFW_X11", "1"); + glfw.root_module.addCMacro("_GLFW_X11", "1"); glfw.linkSystemLibrary("X11"); } if (options.enable_wayland) { @@ -200,7 +200,7 @@ pub fn build(b: *std.Build) void { }, .flags = &.{}, }); - glfw.defineCMacro("_GLFW_WAYLAND", "1"); + glfw.root_module.addCMacro("_GLFW_WAYLAND", "1"); } }, else => {},