@@ -48,8 +48,9 @@ pub fn build(b: *std.Build) void {
48
48
});
49
49
b .installArtifact (capstone );
50
50
capstone .addIncludePath (upstream .path ("include" ));
51
- capstone .installHeadersDirectory (upstream .path ("include/capstone" ), "capstone" , .{});
52
- capstone .installHeader (upstream .path ("include/platform.h" ), "capstone/platform.h" );
51
+ // The header files should be installed in a 'capstone' subdirectory in capstone v6.
52
+ capstone .installHeadersDirectory (upstream .path ("include/capstone" ), "" , .{});
53
+ capstone .installHeader (upstream .path ("include/platform.h" ), "platform.h" );
53
54
capstone .addCSourceFiles (.{ .root = upstream .path ("" ), .files = common_sources });
54
55
55
56
if (build_diet ) capstone .root_module .addCMacro ("CAPSTONE_DIET" , "" );
@@ -81,6 +82,7 @@ pub fn build(b: *std.Build) void {
81
82
.strip = strip ,
82
83
.link_libc = true ,
83
84
});
85
+ cstool .addIncludePath (upstream .path ("include" )); // remove this in capstone v6
84
86
cstool .linkLibrary (capstone );
85
87
cstool .addCSourceFiles (.{ .root = upstream .path ("cstool" ), .files = cstool_sources });
86
88
cstool .addCSourceFile (.{ .file = upstream .path ("cstool/getopt.c" ) });
@@ -116,6 +118,7 @@ pub fn build(b: *std.Build) void {
116
118
.strip = strip ,
117
119
.link_libc = true ,
118
120
});
121
+ exe .addIncludePath (upstream .path ("include" )); // remove this in capstone v6
119
122
exe .linkLibrary (capstone );
120
123
exe .addCSourceFile (.{ .file = upstream .path ("tests" ).path (b , file ) });
121
124
0 commit comments