Skip to content

Commit

Permalink
feat: define build macros in build.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
FrothyMarrow committed May 21, 2024
1 parent 86ba40d commit 2baa853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ pub fn build(b: *std.Build) void {
.target = target,
});

phy.defineCMacro("GL_SILENCE_DEPRECATION", &.{});
phy.defineCMacro("GLFW_INCLUDE_GLCOREARB", &.{});

phy.addIncludePath(.{
.src_path = .{ .owner = b, .sub_path = "include" },
});

phy.addCSourceFiles(.{
.root = .{
.src_path = .{ .owner = b, .sub_path = "src" },
Expand Down
3 changes: 0 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#define GL_SILENCE_DEPRECATION
#define GLFW_INCLUDE_GLCOREARB

#include "vector.h"

#include <GLFW/glfw3.h>
Expand Down

0 comments on commit 2baa853

Please sign in to comment.