add C-flags from raylib
This commit is contained in:
parent
cc8498feba
commit
d2d6e5512e
|
@ -20,7 +20,13 @@ pub fn build(b: *std.build.Builder) void {
|
|||
exe.addIncludeDir("3rdparty/raylib/src");
|
||||
exe.addIncludeDir("3rdparty/raygui/src");
|
||||
exe.addIncludeDir("3rdparty/raygui/examples");
|
||||
exe.addCSourceFile("src/raylib.c", &[_][]u8{});
|
||||
const raylib_flags = &[_][]const u8{
|
||||
"-std=gnu99",
|
||||
"-DPLATFORM_DESKTOP",
|
||||
"-DGL_SILENCE_DEPRECATION=199309L",
|
||||
"-fno-sanitize=undefined",
|
||||
};
|
||||
exe.addCSourceFile("src/raylib.c", raylib_flags);
|
||||
|
||||
exe.setBuildMode(mode);
|
||||
exe.install();
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
const std = @import("std");
|
||||
const r = @import("raylib.zig");
|
||||
|
||||
pub fn main() anyerror!void {
|
||||
r.InitWindow(800, 450, "doggo");
|
||||
defer r.CloseWindow();
|
||||
|
||||
while (!r.WindowShouldClose()) {
|
||||
|
||||
// Draw
|
||||
r.BeginDrawing();
|
||||
defer r.EndDrawing();
|
||||
|
||||
r.ClearBackground(r.RAYWHITE);
|
||||
|
||||
_ = r.GuiMessageBox(
|
||||
r.Rectangle{ .x = 0, .y = 0, .width = 200, .height = 200 },
|
||||
"Message Box Title",
|
||||
"Message content",
|
||||
null,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue