diff options
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | build.zig | 5 |
2 files changed, 5 insertions, 3 deletions
| @@ -72,7 +72,8 @@ If you want to use the bundled sqlite source code file, first you need to add it | |||
| 72 | 72 | ||
| 73 | ```zig | 73 | ```zig |
| 74 | const sqlite = b.addStaticLibrary("sqlite", null); | 74 | const sqlite = b.addStaticLibrary("sqlite", null); |
| 75 | sqlite.addCSourceFile("third_party/zig-sqlite/sqlite3.c", &[_][]const u8{"-std=c99"}); | 75 | sqlite.addCSourceFile("third_party/zig-sqlite/c/sqlite3.c", &[_][]const u8{"-std=c99"}); |
| 76 | sqlite.addIncludeDir("third_party/zig-sqlite/c"); | ||
| 76 | sqlite.linkLibC(); | 77 | sqlite.linkLibC(); |
| 77 | ``` | 78 | ``` |
| 78 | 79 | ||
| @@ -1,4 +1,5 @@ | |||
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | 3 | ||
| 3 | var sqlite3: ?*std.build.LibExeObjStep = null; | 4 | var sqlite3: ?*std.build.LibExeObjStep = null; |
| 4 | 5 | ||
| @@ -44,8 +45,8 @@ const TestTarget = struct { | |||
| 44 | bundled: bool, | 45 | bundled: bool, |
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| 47 | const all_test_targets = switch (std.Target.current.cpu.arch) { | 48 | const all_test_targets = switch (builtin.target.cpu.arch) { |
| 48 | .x86_64 => switch (std.Target.current.os.tag) { | 49 | .x86_64 => switch (builtin.target.os.tag) { |
| 49 | .linux => [_]TestTarget{ | 50 | .linux => [_]TestTarget{ |
| 50 | TestTarget{ | 51 | TestTarget{ |
| 51 | .target = .{}, | 52 | .target = .{}, |