build.zig: link zstd instead of libzstd

Seems like it was used here because `pkg-config` does not work with
`zstd` passed but works with `libzstd`.

In 0.14.0 there was a change with allows pkg-config to be used here:
it now tries to use `lib+libname.pc` if `libname.pc` was not found:
https://github.com/ziglang/zig/pull/22069

This change allows Zig to use plain file search if pkg-config was not
found (it would now search `libzstd.so` instead of `liblibzstd.so`).

Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
This commit is contained in:
Eric Joldasov 2025-03-06 01:14:14 +05:00
parent c9f3d39d3e
commit f4e4694612
No known key found for this signature in database
GPG key ID: 5C9C69060686B588

View file

@ -18,7 +18,7 @@ pub fn build(b: *std.Build) void {
.link_libc = true, .link_libc = true,
}); });
main_mod.linkSystemLibrary("ncursesw", .{}); main_mod.linkSystemLibrary("ncursesw", .{});
main_mod.linkSystemLibrary("libzstd", .{}); main_mod.linkSystemLibrary("zstd", .{});
const exe = b.addExecutable(.{ const exe = b.addExecutable(.{
.name = "ncdu", .name = "ncdu",