Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ jobs:

- name: Build
run: zig build --summary all

- name: Test
run: zig build run-all-tests --summary all
7 changes: 5 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ pub fn build(b: *std.Build) void {
});
b.installArtifact(capstone);
capstone.addIncludePath(upstream.path("include"));
capstone.installHeadersDirectory(upstream.path("include/capstone"), "capstone", .{});
capstone.installHeader(upstream.path("include/platform.h"), "capstone/platform.h");
// The header files should be installed in a 'capstone' subdirectory in capstone v6.
capstone.installHeadersDirectory(upstream.path("include/capstone"), "", .{});
capstone.installHeader(upstream.path("include/platform.h"), "platform.h");
capstone.addCSourceFiles(.{ .root = upstream.path(""), .files = common_sources });

if (build_diet) capstone.root_module.addCMacro("CAPSTONE_DIET", "");
Expand Down Expand Up @@ -81,6 +82,7 @@ pub fn build(b: *std.Build) void {
.strip = strip,
.link_libc = true,
});
cstool.addIncludePath(upstream.path("include")); // remove this in capstone v6
cstool.linkLibrary(capstone);
cstool.addCSourceFiles(.{ .root = upstream.path("cstool"), .files = cstool_sources });
cstool.addCSourceFile(.{ .file = upstream.path("cstool/getopt.c") });
Expand Down Expand Up @@ -116,6 +118,7 @@ pub fn build(b: *std.Build) void {
.strip = strip,
.link_libc = true,
});
exe.addIncludePath(upstream.path("include")); // remove this in capstone v6
exe.linkLibrary(capstone);
exe.addCSourceFile(.{ .file = upstream.path("tests").path(b, file) });

Expand Down
Loading