using addCMacro instead of defineCMacro (#4620)

Co-authored-by: Johannes Rønning <johannes@picterus.com>
This commit is contained in:
Johannes 2024-12-28 15:57:10 +01:00 committed by GitHub
parent e062dc085c
commit 75b6b825df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 15 deletions

View file

@ -46,7 +46,7 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.Reso
exe.linkSystemLibrary("gdi32");
exe.linkSystemLibrary("opengl32");
exe.defineCMacro("PLATFORM_DESKTOP", null);
exe.root_module.addCMacro("PLATFORM_DESKTOP", "");
},
.linux => {
exe.linkSystemLibrary("GL");
@ -55,7 +55,7 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.Reso
exe.linkSystemLibrary("m");
exe.linkSystemLibrary("X11");
exe.defineCMacro("PLATFORM_DESKTOP", null);
exe.root_module.addCMacro("PLATFORM_DESKTOP", "");
},
.macos => {
exe.linkFramework("Foundation");
@ -65,7 +65,7 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.Reso
exe.linkFramework("CoreVideo");
exe.linkFramework("IOKit");
exe.defineCMacro("PLATFORM_DESKTOP", null);
exe.root_module.addCMacro("PLATFORM_DESKTOP", "");
},
else => {
@panic("Unsupported OS");