const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
- const opt_docking = b.option(bool, "docking", "Build with docking support") orelse false;
-
// Get the matching Zig module name, C header search path and C library for
// vanilla imgui vs the imgui docking branch.
- const cimgui_conf = cimgui.getConfig(opt_docking);
+ const cimgui_conf = cimgui.getConfig(true);
// note that the sokol dependency is built with `.with_sokol_imgui = true`
const dep_sokol = b.dependency("sokol", .{
const dep_shdc = dep_sokol.builder.dependency("shdc", .{});
const shdc_step = try sokol.shdc.createSourceFile(b, .{
.shdc_dep = dep_shdc,
- .input = "src/shader/quad.glsl",
- .output = "src/shader/quad.glsl.zig",
+ .input = "shd/quad.glsl",
+ .output = "src/shd/quad.glsl.zig",
.slang = .{ .glsl430 = true },
});
.{ .name = "sokol", .module = dep_sokol.module("sokol") },
.{ .name = cimgui_conf.module_name, .module = dep_cimgui.module(cimgui_conf.module_name) },
},
+ .link_libc = true,
});
- const mod_options = b.addOptions();
- mod_options.addOption(bool, "docking", opt_docking);
- mod_main.addOptions("build_options", mod_options);
+
+ mod_main.addIncludePath(b.path("src"));
+ mod_main.addCSourceFile(.{.file = b.path("src/stb_image.c")});
// from here on different handling for native vs wasm builds
if (target.result.cpu.arch.isWasm()) {