From 98738b3ba578cd6622266345feb39ae30e9b323c Mon Sep 17 00:00:00 2001 From: Snorlax <57375992+SnorlaxAssist@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:48:35 -0400 Subject: [PATCH] Update build.zig --- build.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 20a2c8d..8bbe072 100644 --- a/build.zig +++ b/build.zig @@ -20,12 +20,18 @@ pub fn build(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); const lib = b.addStaticLibrary(.{ - .name = "zig-lz4", + .name = "lz4", .root_source_file = b.path(LIB_SRC), .target = target, .optimize = optimize, }); + const lz4_module = b.addModule("zig-lz4", .{ + .root_source_file = b.path("src/lib.zig"), + }); + + lz4_module.linkLibrary(lib); + const FLAGS = [_][]const u8{ "-DLZ4LIB_API=extern\"C\"", };