build-system: Replace deprecated usages of addStaticLibrary with addLibrary (#8029)

Hi there, this is just a low-hanging fruit and it also prepares the way
for the future 0.15, which removes addStaticLibrary.
Please, let me know what to do on the `// TODO` comments.
This commit is contained in:
Jayson Reis
2025-07-22 23:47:18 +02:00
committed by GitHub
parent c903754b70
commit acc2ea724f
19 changed files with 110 additions and 55 deletions

View File

@@ -92,10 +92,13 @@ fn buildLib(b: *std.Build, module: *std.Build.Module, options: anytype) !*std.Bu
.@"enable-libpng" = true,
});
const lib = b.addStaticLibrary(.{
const lib = b.addLibrary(.{
.name = "harfbuzz",
.target = target,
.optimize = optimize,
.root_module = b.createModule(.{
.target = target,
.optimize = optimize,
}),
.linkage = .static,
});
lib.linkLibC();
lib.linkLibCpp();