ecs: add pkg declaration, remove static library

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-06-09 23:00:05 -07:00 committed by Stephen Gutekanst
parent 14ec786c62
commit 5fd5638df0

View file

@ -2,16 +2,17 @@ const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const mode = b.standardReleaseOptions();
const target = b.standardTargetOptions(.{});
const lib = b.addStaticLibrary("ecs", "src/main.zig");
lib.setBuildMode(mode);
lib.setTarget(target);
lib.install();
const main_tests = b.addTest("src/main.zig");
main_tests.addPackage(pkg);
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
}
pub const pkg = std.build.Pkg{
.name = "ecs",
.source = .{ .path = "src/main.zig" },
.dependencies = &[_]std.build.Pkg{},
};