const std = @import("std"); const Engine = @import("engine"); pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const mod = b.createModule(.{ .root_source_file = b.path("src/game.zig"), }); const dep_tiled = b.dependency("tiled", .{}); mod.addImport("tiled", dep_tiled.module("tiled")); Engine.init(b, .{ .name = "sokol_template", .root_module = mod, .target = target, .optimize = optimize, .dep_engine = b.dependency("engine", .{}), .has_imgui = b.option(bool, "imgui", "ImGui integration"), .has_tracy = b.option(bool, "tracy", "Tracy integration"), .win32_has_console = b.option(bool, "console", "Show console (Window only)"), .win32_png_icon = b.path("src/assets/icon.png"), .code_dynamic_linking = b.option(bool, "code-hot-reload", "Dynamically load game code at runtime"), .asset_hot_reload = b.option(bool, "asset-hot-reload", "Load assets at runtime"), .asset_dir = b.path("src/assets/"), }); { mod.resolved_target = target; const exe_tests = b.addTest(.{ .root_module = mod, }); const run_exe_tests = b.addRunArtifact(exe_tests); const test_step = b.step("test", "Run tests"); test_step.dependOn(&run_exe_tests.step); } }