chore: replace link() with getModule()
This commit is contained in:
parent
acb59994fc
commit
215e053b9a
|
@ -6,19 +6,14 @@ fn path(comptime suffix: []const u8) []const u8 {
|
||||||
return comptime (std.fs.path.dirname(@src().file) orelse ".") ++ std.fs.path.sep_str ++ suffix;
|
return comptime (std.fs.path.dirname(@src().file) orelse ".") ++ std.fs.path.sep_str ++ suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn link(exe: *CompileStep) void {
|
pub fn getModule(b: *std.Build) *std.build.Module {
|
||||||
// create zig-network module
|
|
||||||
const b = exe.builder;
|
|
||||||
|
|
||||||
// https://github.com/MasterQ32/zig-network
|
// https://github.com/MasterQ32/zig-network
|
||||||
const network = b.createModule(.{ .source_file = .{ .path = path("lib/zig-network/network.zig") } });
|
const network = b.createModule(.{ .source_file = .{ .path = path("lib/zig-network/network.zig") } });
|
||||||
|
|
||||||
const gdbstub = b.createModule(.{
|
return b.createModule(.{
|
||||||
.source_file = .{ .path = path("src/lib.zig") },
|
.source_file = .{ .path = path("src/lib.zig") },
|
||||||
.dependencies = &.{.{ .name = "network", .module = network }},
|
.dependencies = &.{.{ .name = "network", .module = network }},
|
||||||
});
|
});
|
||||||
|
|
||||||
exe.addModule("gdbstub", gdbstub);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
|
|
Loading…
Reference in New Issue