diff --git a/build.zig b/build.zig index c4d3509..87468dd 100644 --- a/build.zig +++ b/build.zig @@ -44,6 +44,12 @@ pub fn build(b: *std.Build) !void { .root_module = exe_mod, }); + const lib = b.addLibrary(.{ + .name = "squashfs", + .root_module = mod, + }); + + b.installArtifact(lib); b.installArtifact(exe); const run_step = b.step("run", "Run the app"); const run_cmd = b.addRunArtifact(exe); diff --git a/src/decomp.zig b/src/decomp.zig index ce43515..6073024 100644 --- a/src/decomp.zig +++ b/src/decomp.zig @@ -6,8 +6,8 @@ const Reader = std.Io.Reader; const builtin = @import("builtin"); const config = if (builtin.is_test) .{ - .use_c_libs = true, - .allow_lzo = false, + .use_c_libs = builtin.link_libc == true, + .allow_lzo = false, // Change once LZO compilation is fixed } else @import("config"); const c = @cImport({