forked from vv/efemra
1
0
Fork 0
efemra/build.zig

29 lines
822 B
Zig

const std = @import("std");
const pkgs = @import("deps.zig").pkgs;
const build_pkgs = @import("deps.zig").build_pkgs;
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("efemra", "src/main.zig");
exe.setTarget(target);
exe.setBuildMode(mode);
const gen = build_pkgs.build_vulkan.VkGenerateStep.init(b, "etc/vk.xml", "vk.zig");
exe.addPackage(pkgs.glfw);
exe.addPackage(gen.package);
build_pkgs.build_glfw.link(b, exe, .{});
exe.install();
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}