2021-05-10 23:57:41 -06:00
|
|
|
const std = @import("std");
|
|
|
|
|
2024-06-19 00:26:57 -06:00
|
|
|
pub fn build(b: *std.Build) void {
|
|
|
|
const target = b.standardTargetOptions(.{});
|
2023-06-03 13:09:52 -06:00
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
2021-05-10 23:57:41 -06:00
|
|
|
|
2023-06-03 13:09:52 -06:00
|
|
|
_ = b.addModule("jwt", .{
|
2024-06-19 00:26:57 -06:00
|
|
|
.root_source_file = b.path("jwt.zig"),
|
2023-06-03 13:09:52 -06:00
|
|
|
});
|
2021-05-10 23:57:41 -06:00
|
|
|
|
2023-06-03 13:09:52 -06:00
|
|
|
const lib = b.addStaticLibrary(.{
|
|
|
|
.name = "zig-jwt",
|
2024-06-19 00:26:57 -06:00
|
|
|
.root_source_file = b.path("jwt.zig"),
|
2023-06-03 13:09:52 -06:00
|
|
|
.optimize = optimize,
|
|
|
|
.target = target,
|
|
|
|
});
|
|
|
|
b.installArtifact(lib);
|
|
|
|
|
2023-08-16 23:00:30 -06:00
|
|
|
const main_tests = b.addTest(.{
|
2024-06-19 00:26:57 -06:00
|
|
|
.root_source_file = b.path("jwt.zig"),
|
2023-06-03 13:09:52 -06:00
|
|
|
});
|
2023-08-16 23:00:30 -06:00
|
|
|
const run_main_tests = b.addRunArtifact(main_tests);
|
2021-05-10 23:57:41 -06:00
|
|
|
|
|
|
|
const test_step = b.step("test", "Run library tests");
|
2023-08-16 23:00:30 -06:00
|
|
|
test_step.dependOn(&run_main_tests.step);
|
2021-05-10 23:57:41 -06:00
|
|
|
}
|