Move api to package
This commit is contained in:
parent
1aec8031e6
commit
581159963f
14 changed files with 43 additions and 74 deletions
|
@ -17,10 +17,16 @@ const sql_pkg = std.build.Pkg{
|
|||
.dependencies = &.{util_pkg},
|
||||
};
|
||||
|
||||
const api_pkg = std.build.Pkg{
|
||||
.name = "api",
|
||||
.source = std.build.FileSource.relative("src/api/lib.zig"),
|
||||
.dependencies = &.{ util_pkg, sql_pkg },
|
||||
};
|
||||
|
||||
const main_pkg = std.build.Pkg{
|
||||
.name = "main",
|
||||
.source = std.build.FileSource.relative("src/main/main.zig"),
|
||||
.dependencies = &.{ util_pkg, http_pkg, sql_pkg },
|
||||
.dependencies = &.{ util_pkg, http_pkg, sql_pkg, api_pkg },
|
||||
};
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
|
@ -41,6 +47,7 @@ pub fn build(b: *std.build.Builder) void {
|
|||
exe.addPackage(sql_pkg);
|
||||
exe.addPackage(util_pkg);
|
||||
exe.addPackage(http_pkg);
|
||||
exe.addPackage(api_pkg);
|
||||
|
||||
exe.linkSystemLibrary("sqlite3");
|
||||
exe.linkSystemLibrary("pq");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue