Skip to content

Commit

Permalink
add zig-odbc module before shared lib
Browse files Browse the repository at this point in the history
  • Loading branch information
rupurt committed Feb 15, 2024
1 parent 65a57b4 commit 8ad1558
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<sha>.tar.gz",
.hash = "<hash>",
}
}
},
.paths = .{
"build.zig",
"build.zig.zon",
"src",
"LICENSE",
"README.md",
},
}
// build.zig
Expand Down
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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;
Expand Down

0 comments on commit 8ad1558

Please sign in to comment.