Backlog/projects/archive/minimal/build.zig

51 lines
1.4 KiB
Zig

const std = @import("std");
const Backlog = @import("Backlog");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
var blbuild = Backlog.init(b, .{
.target = target,
.optimize = optimize,
.backlogRoot = "../",
});
// const minimalExe = blbuild.addProgram(.{
// .name = "minimal",
// .desc = "tool program, no assets",
// .root_source_file = b.path("src/main.zig"),
// });
// minimalExe.addImport("backlog_api", blbuild.generateApi("minimal", &.{
// "core",
// "platform",
// "assets",
// "audio",
// "physics",
// "rend",
// "imgui",
// "ui",
// }));
// // minimalExe.addImport("core", blbuild.nwdep.module("core"));
// blbuild.addDependencyInstalls(b, .ReleaseFast); //.ReleaseFast);
const minimal = blbuild.program(.{
.name = "minimal",
.desc = "simple program built with backlog",
.root_source_file = b.path("src/main.zig"),
});
//// each one here corresponds to a different module under engine/
////
//// new build system should make a new 'backlog'
//// that doesn't even get these modules linked in
//
// these are already disabled at the start
minimal.setModuleEnabled("imgui", true);
_ = minimal.compileInstall();
////minimal.addExtraModule();
}