Skip to content

Commit

Permalink
refactor: drop termbox_impl.c
Browse files Browse the repository at this point in the history
use `@cDefine()` instead
  • Loading branch information
charlesrocket committed Sep 20, 2024
1 parent 791d66d commit a9f7697
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub fn build(b: *std.Build) void {
}

exe.addIncludePath(b.dependency("termbox2", .{}).path("."));
exe.addCSourceFile(.{ .file = b.path("src/termbox_impl.c") });
exe.linkLibC();
exe.root_module.addImport("cova", cova_mod);
exe.root_module.addOptions("build_options", build_options);
Expand All @@ -57,7 +56,6 @@ pub fn build(b: *std.Build) void {
});

unit_tests.addIncludePath(b.dependency("termbox2", .{}).path("."));
unit_tests.addCSourceFile(.{ .file = b.path("src/termbox_impl.c") });
unit_tests.linkLibC();

const test_step = b.step("test", "Run all tests");
Expand Down
1 change: 1 addition & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const std = @import("std");
const builtin = @import("builtin");
const tb = @cImport({
@cDefine("TB_IMPL", {});
@cInclude("termbox2.h");
});

Expand Down
2 changes: 0 additions & 2 deletions src/termbox_impl.c

This file was deleted.

0 comments on commit a9f7697

Please sign in to comment.