use InstallHeader function to install the header

This commit is contained in:
2025-04-23 07:31:38 -04:00
parent c0e466b28a
commit ce21b94a43

View File

@@ -59,12 +59,7 @@ pub fn build(b: *std.Build) void {
b.installArtifact(dynamic_lib);
// C Headers
const c_header = b.addInstallFileWithDir(
b.path("include/zaprus.h"),
.header,
"zaprus.h",
);
const c_header = b.addInstallHeaderFile(b.path("include/zaprus.h"), "zaprus.h");
b.getInstallStep().dependOn(&c_header.step);
// This creates another `std.Build.Step.Compile`, but this one builds an executable