From 8ad15587298bf97691aed4f2e8aaec8e2c8344ef Mon Sep 17 00:00:00 2001 From: Alex Kwiatkowski Date: Wed, 14 Feb 2024 21:24:24 -1000 Subject: [PATCH] add zig-odbc module before shared lib --- README.md | 10 +++++++++- build.zig | 8 ++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 04b4109..cb25e92 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,20 @@ You can use the following configuration as a starting point when adding `zig-odb .{ .name = "", .version = "", + .minimum_zig_version = "0.12.0", .dependencies = .{ .zig_odbc = .{ .url = "https://github.com/mjoerussell/zig-odbc/.tar.gz", .hash = "", } - } + }, + .paths = .{ + "build.zig", + "build.zig.zon", + "src", + "LICENSE", + "README.md", + }, } // build.zig diff --git a/build.zig b/build.zig index 622c602..33d6161 100644 --- a/build.zig +++ b/build.zig @@ -24,6 +24,10 @@ pub fn build(b: *Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); + _ = b.addModule("zig-odbc", .{ + .root_source_file = .{ .path = "src/lib.zig" }, + }); + const lib = b.addSharedLibrary(.{ .name = "zigodbc", .root_source_file = .{ .path = "src/lib.zig" }, @@ -36,10 +40,6 @@ pub fn build(b: *Build) void { b.installArtifact(lib); - _ = b.addModule("zig-odbc", .{ - .root_source_file = .{ .path = "src/lib.zig" }, - }); - const test_step = b.step("test", "Run library tests"); var tests: [test_files.len]*std.Build.Step.Run = undefined;