mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00

This makes the zig build compatible with the upcoming zig 0.15 release, while still supporting the current stable 0.14 release still used in CI.
31 lines
813 B
Zig
31 lines
813 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) !void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
const upstream = b.dependency("unibilium", .{});
|
|
const lib = b.addLibrary(.{
|
|
.name = "unibilium",
|
|
.linkage = .static,
|
|
.root_module = b.createModule(.{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
}),
|
|
});
|
|
|
|
lib.addIncludePath(upstream.path(""));
|
|
|
|
lib.installHeader(upstream.path("unibilium.h"), "unibilium.h");
|
|
|
|
lib.linkLibC();
|
|
|
|
lib.addCSourceFiles(.{ .root = upstream.path(""), .files = &.{
|
|
"unibilium.c",
|
|
"uninames.c",
|
|
"uniutil.c",
|
|
}, .flags = &.{"-DTERMINFO_DIRS=\"/etc/terminfo:/usr/share/terminfo\""} });
|
|
|
|
b.installArtifact(lib);
|
|
}
|