lib-vt: boilerplate to build a shared object

This commit is contained in:
Mitchell Hashimoto
2025-09-23 12:33:22 -07:00
parent f97518cc10
commit b006101ddd
7 changed files with 116 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ pub fn build(b: *std.Build) !void {
// All our steps which we'll hook up later. The steps are shown
// up here just so that they are more self-documenting.
const libvt_step = b.step("lib-vt", "Build libghostty-vt");
const run_step = b.step("run", "Run the app");
const run_valgrind_step = b.step(
"run-valgrind",
@@ -86,7 +87,7 @@ pub fn build(b: *std.Build) !void {
check_step.dependOn(dist.install_step);
}
// libghostty
// libghostty (internal, big)
const libghostty_shared = try buildpkg.GhosttyLib.initShared(
b,
&deps,
@@ -96,6 +97,15 @@ pub fn build(b: *std.Build) !void {
&deps,
);
// libghostty-vt
const libghostty_vt_shared = try buildpkg.GhosttyLibVt.initShared(
b,
&mod,
&deps,
);
libghostty_vt_shared.install(libvt_step, "libghostty-vt.so");
libghostty_vt_shared.installHeader(libvt_step);
// Helpgen
if (config.emit_helpgen) deps.help_strings.install();