2023-04-28 23:14:50 -04:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
|
|
|
var lib = b.addStaticLibrary(.{
|
|
|
|
|
.name = "tree-sitter",
|
|
|
|
|
.target = b.standardTargetOptions(.{}),
|
|
|
|
|
.optimize = b.standardOptimizeOption(.{}),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
lib.linkLibC();
|
2024-05-23 21:44:52 +02:00
|
|
|
lib.addCSourceFile(.{ .file = b.path("lib/src/lib.c"), .flags = &.{"-std=c11"} });
|
|
|
|
|
lib.addIncludePath(b.path("lib/include"));
|
|
|
|
|
lib.addIncludePath(b.path("lib/src"));
|
2023-04-28 23:14:50 -04:00
|
|
|
|
2024-04-24 09:57:16 +02:00
|
|
|
lib.installHeadersDirectory(b.path("lib/include"), ".", .{});
|
|
|
|
|
|
2023-04-28 23:14:50 -04:00
|
|
|
b.installArtifact(lib);
|
|
|
|
|
}
|