56 lines
1.8 KiB
Zig
56 lines
1.8 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 sampleGame = blbuild.program(.{
|
|
.name = "sampleGame",
|
|
.desc = "sdl3 project sample",
|
|
.root_source_file = b.path("sampleGame/main.zig"),
|
|
});
|
|
|
|
sampleGame.setModuleEnabled("imgui", true);
|
|
sampleGame.setModuleEnabled("audio", true);
|
|
sampleGame.setModuleEnabled("physics", true);
|
|
sampleGame.addExtraModule("gameExtras");
|
|
sampleGame.addExtraModule("videoplayer");
|
|
sampleGame.addExtraModule("doomplayer");
|
|
sampleGame.addExtraModule("bsp");
|
|
|
|
{ // extern game
|
|
const externGame = sampleGame.addDynamicModule("externGame", b.path("sampleGame/externGame/externGame.zig"));
|
|
|
|
_ = externGame.compileInstall();
|
|
}
|
|
|
|
_ = sampleGame.compileInstall();
|
|
|
|
// external reload modules
|
|
// const sampleGameExtern = b.addSharedLibrary(.{
|
|
// .root_source_file = b.path("sampleGame/externGame/externGame.zig"),
|
|
// .link_libc = true,
|
|
// .optimize = optimize,
|
|
// .target = target,
|
|
// .name = "externGame",
|
|
// });
|
|
|
|
// blbuild.addExtraModule(sampleGameExtern.root_module, "gameExtras");
|
|
// blbuild.addExtraModule(sampleGameExtern.root_module, "bsp");
|
|
// sampleGameExtern.root_module.addImport("backlog", blbuild.nw_mod);
|
|
|
|
// const installExtern = b.addInstallArtifact(sampleGameExtern, .{
|
|
// .dest_dir = .{ .override = .{ .custom = "modules" } },
|
|
// });
|
|
// b.getInstallStep().dependOn(&installExtern.step);
|
|
|
|
blbuild.addDependencyInstalls(b, .ReleaseFast); //.ReleaseFast);
|
|
}
|