mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
NEW BUILD SYSTEM!
This is a MVP implementation which supports building the "nvim" binary,
including cross-compilation for some targets.
As an example, you can build a aarch64-macos binary from
an x86-64-linux-gnu host, or vice versa
Add CI target for build.zig currently for functionaltests on linux
x86_64 only
Follow up items:
- praxis for version and dependency bumping
- windows 💀
- full integration of libintl and gettext (or a desicion not to)
- update help and API metadata files
- installation into a $PREFIX
- more tests and linters
28 lines
730 B
Zig
28 lines
730 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.addStaticLibrary(.{
|
|
.name = "unibilium",
|
|
.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);
|
|
}
|