40 lines
1.2 KiB
Zig
40 lines
1.2 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.addProgram(.{
|
|
.name = "sampleGame",
|
|
.desc = "sdl3 project sample",
|
|
.root_source_file = b.path("sampleGame/main.zig"),
|
|
});
|
|
|
|
blbuild.addExtraModule(sampleGame, "gameExtras");
|
|
blbuild.addExtraModule(sampleGame, "videoplayer");
|
|
blbuild.addExtraModule(sampleGame, "doomplayer");
|
|
blbuild.addExtraModule(sampleGame, "bsp");
|
|
|
|
const sampleGameExtern = b.addSharedLibrary(.{
|
|
.root_source_file = b.path("sampleGame/externGame/externGame.zig"),
|
|
.link_libc = true,
|
|
.optimize = optimize,
|
|
.target = target,
|
|
.name = "externGame",
|
|
});
|
|
|
|
sampleGameExtern.root_module.addImport("backlog", blbuild.nw_mod);
|
|
|
|
const installExtern = b.addInstallArtifact(sampleGameExtern, .{
|
|
.dest_dir = .{ .override = .{ .custom = "modules" } },
|
|
});
|
|
b.getInstallStep().dependOn(&installExtern.step);
|
|
}
|