Browse Source

build.zig: fix raygui inclusion in windows crosscompilation

pull/4489/head
kimierik 3 days ago
parent
commit
ee66242f9f
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      build.zig

+ 2
- 0
build.zig View File

@ -302,12 +302,14 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
}
pub fn addRaygui(b: *std.Build, raylib: *std.Build.Step.Compile, raygui_dep: *std.Build.Dependency) void {
const raylib_dep = b.dependencyFromBuildZig(@This(), .{});
var gen_step = b.addWriteFiles();
raylib.step.dependOn(&gen_step.step);
const raygui_c_path = gen_step.add("raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
raylib.addCSourceFile(.{ .file = raygui_c_path });
raylib.addIncludePath(raygui_dep.path("src"));
raylib.addIncludePath(raylib_dep.path("src"));
raylib.installHeader(raygui_dep.path("src/raygui.h"), "raygui.h");
}

Loading…
Cancel
Save