aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/pkg/dcimgui
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/pkg/dcimgui
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/pkg/dcimgui')
-rw-r--r--vendor/libghostty-vt/pkg/dcimgui/build.zig40
-rw-r--r--vendor/libghostty-vt/pkg/dcimgui/build.zig.zon2
2 files changed, 20 insertions, 22 deletions
diff --git a/vendor/libghostty-vt/pkg/dcimgui/build.zig b/vendor/libghostty-vt/pkg/dcimgui/build.zig
index 924e7c93..f74d3673 100644
--- a/vendor/libghostty-vt/pkg/dcimgui/build.zig
+++ b/vendor/libghostty-vt/pkg/dcimgui/build.zig
@@ -22,18 +22,16 @@ pub fn build(b: *std.Build) !void {
.root_module = b.createModule(.{
.target = target,
.optimize = optimize,
+ .link_libc = true,
+ // On MSVC, we must not use linkLibCpp because Zig unconditionally
+ // passes -nostdinc++ and then adds its bundled libc++/libc++abi
+ // include paths, which conflict with MSVC's own C++ runtime
+ // headers. The MSVC SDK include directories (added via linkLibC)
+ // contain both C and C++ headers, so linkLibCpp is not needed.
+ .link_libcpp = target.result.abi != .msvc,
}),
.linkage = .static,
});
- lib.linkLibC();
- // On MSVC, we must not use linkLibCpp because Zig unconditionally
- // passes -nostdinc++ and then adds its bundled libc++/libc++abi
- // include paths, which conflict with MSVC's own C++ runtime headers.
- // The MSVC SDK include directories (added via linkLibC) contain
- // both C and C++ headers, so linkLibCpp is not needed.
- if (target.result.abi != .msvc) {
- lib.linkLibCpp();
- }
b.installArtifact(lib);
// Zig module
@@ -87,8 +85,8 @@ pub fn build(b: *std.Build) !void {
// Add the core Dear Imgui source files
if (b.lazyDependency("imgui", .{})) |upstream| {
- lib.addIncludePath(upstream.path(""));
- lib.addCSourceFiles(.{
+ lib.root_module.addIncludePath(upstream.path(""));
+ lib.root_module.addCSourceFiles(.{
.root = upstream.path(""),
.files = &.{
"imgui_demo.cpp",
@@ -107,20 +105,20 @@ pub fn build(b: *std.Build) !void {
);
if (freetype) {
- lib.addCSourceFile(.{
+ lib.root_module.addCSourceFile(.{
.file = upstream.path("misc/freetype/imgui_freetype.cpp"),
.flags = flags.items,
});
if (b.systemIntegrationOption("freetype", .{})) {
- lib.linkSystemLibrary2("freetype2", dynamic_link_opts);
+ lib.root_module.linkSystemLibrary("freetype2", dynamic_link_opts);
} else {
const freetype_dep = b.dependency("freetype", .{
.target = target,
.optimize = optimize,
.@"enable-libpng" = true,
});
- lib.linkLibrary(freetype_dep.artifact("freetype"));
+ lib.root_module.linkLibrary(freetype_dep.artifact("freetype"));
if (freetype_dep.builder.lazyDependency(
"freetype",
.{},
@@ -131,7 +129,7 @@ pub fn build(b: *std.Build) !void {
}
if (backend_metal) {
- lib.addCSourceFiles(.{
+ lib.root_module.addCSourceFiles(.{
.root = upstream.path("backends"),
.files = &.{"imgui_impl_metal.mm"},
.flags = flags.items,
@@ -143,7 +141,7 @@ pub fn build(b: *std.Build) !void {
);
}
if (backend_osx) {
- lib.addCSourceFiles(.{
+ lib.root_module.addCSourceFiles(.{
.root = upstream.path("backends"),
.files = &.{"imgui_impl_osx.mm"},
.flags = flags.items,
@@ -155,7 +153,7 @@ pub fn build(b: *std.Build) !void {
);
}
if (backend_opengl3) {
- lib.addCSourceFiles(.{
+ lib.root_module.addCSourceFiles(.{
.root = upstream.path("backends"),
.files = &.{"imgui_impl_opengl3.cpp"},
.flags = flags.items,
@@ -170,8 +168,8 @@ pub fn build(b: *std.Build) !void {
// Add the C bindings
if (b.lazyDependency("bindings", .{})) |upstream| {
- lib.addIncludePath(upstream.path(""));
- lib.addCSourceFiles(.{
+ lib.root_module.addIncludePath(upstream.path(""));
+ lib.root_module.addCSourceFiles(.{
.root = upstream.path(""),
.files = &.{
"dcimgui.cpp",
@@ -179,7 +177,7 @@ pub fn build(b: *std.Build) !void {
},
.flags = flags.items,
});
- lib.addCSourceFiles(.{
+ lib.root_module.addCSourceFiles(.{
.root = b.path(""),
.files = &.{"ext.cpp"},
.flags = flags.items,
@@ -201,7 +199,7 @@ pub fn build(b: *std.Build) !void {
}),
});
test_exe.root_module.addOptions("build_options", options);
- test_exe.linkLibrary(lib);
+ test_exe.root_module.linkLibrary(lib);
const tests_run = b.addRunArtifact(test_exe);
const test_step = b.step("test", "Run tests");
test_step.dependOn(&tests_run.step);
diff --git a/vendor/libghostty-vt/pkg/dcimgui/build.zig.zon b/vendor/libghostty-vt/pkg/dcimgui/build.zig.zon
index 95d0120e..c488e612 100644
--- a/vendor/libghostty-vt/pkg/dcimgui/build.zig.zon
+++ b/vendor/libghostty-vt/pkg/dcimgui/build.zig.zon
@@ -15,7 +15,7 @@
.imgui = .{
// https://github.com/ocornut/imgui
- .url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.5-docking.tar.gz",
+ .url = "https://deps.files.ghostty.org/N-V-__8AAEbOfQBnvcFcCX2W5z7tDaN8vaNZGamEQtNOe0UI.tar.gz",
.hash = "N-V-__8AAEbOfQBnvcFcCX2W5z7tDaN8vaNZGamEQtNOe0UI",
.lazy = true,
},