Skip to content

Commit

Permalink
use new b.path for setting build path
Browse files Browse the repository at this point in the history
  • Loading branch information
karlseguin committed May 18, 2024
1 parent 2415644 commit fa961d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ pub fn build(b: *std.Build) !void {
const sqlite3_build = b.option([]const []const u8, "sqlite3", "options to use when compiling sqlite3") orelse &default_sqlite3_build;

_ = b.addModule("zqlite", .{
.root_source_file = .{ .path = "zqlite.zig" },
.root_source_file = b.path("zqlite.zig"),
});

const lib_test = b.addTest(.{
.root_source_file = .{ .path = "zqlite.zig" },
.root_source_file = b.path("zqlite.zig"),
.target = target,
.optimize = optimize,
});
lib_test.addCSourceFile(.{
.file = std.Build.LazyPath.relative("lib/sqlite3/sqlite3.c"),
.file = b.path("lib/sqlite3/sqlite3.c"),
.flags = sqlite3_build,
});
lib_test.addIncludePath(std.Build.LazyPath.relative("lib/sqlite3/"));
lib_test.addIncludePath(b.path("lib/sqlite3/"));
lib_test.linkLibC();

const run_test = b.addRunArtifact(lib_test);
Expand Down

0 comments on commit fa961d7

Please sign in to comment.