2024-03-16 19:04:56 +01:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
|
|
|
|
const exe = b.addExecutable(.{
|
|
|
|
.name = "playvid",
|
2024-06-21 18:43:42 +02:00
|
|
|
.root_source_file = b.path("src/main.zig"),
|
2024-03-16 19:04:56 +01:00
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
2024-03-20 20:45:59 +01:00
|
|
|
exe.root_module.addImport("common", b.dependency("common", .{}).module("common"));
|
|
|
|
|
2024-03-16 19:04:56 +01:00
|
|
|
b.installArtifact(exe);
|
|
|
|
|
|
|
|
const run_cmd = b.addRunArtifact(exe);
|
|
|
|
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);
|
|
|
|
}
|