mirror of
https://github.com/neovim/neovim.git
synced 2026-05-25 14:28:28 +00:00
33 lines
928 B
Zig
33 lines
928 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) !void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
const lib = b.addLibrary(.{
|
|
.name = "unibilium",
|
|
.linkage = .static,
|
|
.root_module = b.createModule(.{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
}),
|
|
});
|
|
|
|
if (b.lazyDependency("unibilium", .{})) |upstream| {
|
|
var root_module = lib.root_module;
|
|
root_module.addIncludePath(upstream.path(""));
|
|
|
|
lib.installHeader(upstream.path("unibilium.h"), "unibilium.h");
|
|
|
|
root_module.link_libc = true;
|
|
|
|
root_module.addCSourceFiles(.{ .root = upstream.path(""), .files = &.{
|
|
"unibilium.c",
|
|
"uninames.c",
|
|
"uniutil.c",
|
|
}, .flags = &.{"-DTERMINFO_DIRS=\"/etc/terminfo:/usr/share/terminfo\""} });
|
|
}
|
|
|
|
b.installArtifact(lib);
|
|
}
|