ecs: add pkg declaration, remove static library
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
14ec786c62
commit
5fd5638df0
1 changed files with 7 additions and 6 deletions
|
|
@ -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{},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue