update to example/build.zig, replaced 'defineCMacro' with new API
This commit is contained in:
parent
6854a47957
commit
e2141a1017
|
|
@ -46,7 +46,7 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.Reso
|
||||||
exe.linkSystemLibrary("gdi32");
|
exe.linkSystemLibrary("gdi32");
|
||||||
exe.linkSystemLibrary("opengl32");
|
exe.linkSystemLibrary("opengl32");
|
||||||
|
|
||||||
exe.defineCMacro("PLATFORM_DESKTOP", null);
|
exe.root_module.addCMacro("PLATFORM_DESKTOP", "");
|
||||||
},
|
},
|
||||||
.linux => {
|
.linux => {
|
||||||
exe.linkSystemLibrary("GL");
|
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("m");
|
||||||
exe.linkSystemLibrary("X11");
|
exe.linkSystemLibrary("X11");
|
||||||
|
|
||||||
exe.defineCMacro("PLATFORM_DESKTOP", null);
|
exe.root_module.addCMacro("PLATFORM_DESKTOP", "");
|
||||||
},
|
},
|
||||||
.macos => {
|
.macos => {
|
||||||
exe.linkFramework("Foundation");
|
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("CoreVideo");
|
||||||
exe.linkFramework("IOKit");
|
exe.linkFramework("IOKit");
|
||||||
|
|
||||||
exe.defineCMacro("PLATFORM_DESKTOP", null);
|
exe.root_module.addCMacro("PLATFORM_DESKTOP", "");
|
||||||
},
|
},
|
||||||
else => {
|
else => {
|
||||||
@panic("Unsupported OS");
|
@panic("Unsupported OS");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user