all: build: organize build files and reduce unreachables (#567)

This commit is contained in:
Ali Chraghi 2022-09-25 20:32:51 +03:30 committed by GitHub
parent cc301493ca
commit fcb82345d4
Failed to generate hash of commit
10 changed files with 434 additions and 419 deletions

View file

@ -1,5 +1,11 @@
const std = @import("std");
pub const pkg = std.build.Pkg{
.name = "ecs",
.source = .{ .path = thisDir() ++ "/src/main.zig" },
.dependencies = &[_]std.build.Pkg{},
};
pub fn build(b: *std.build.Builder) void {
const mode = b.standardReleaseOptions();
const target = b.standardTargetOptions(.{});
@ -15,12 +21,6 @@ pub fn testStep(b: *std.build.Builder, mode: std.builtin.Mode, target: std.zig.C
return main_tests.run();
}
pub const pkg = std.build.Pkg{
.name = "ecs",
.source = .{ .path = thisDir() ++ "/src/main.zig" },
.dependencies = &[_]std.build.Pkg{},
};
fn thisDir() []const u8 {
return std.fs.path.dirname(@src().file) orelse ".";
}