diff options
| author | 2022-04-01 22:33:53 +0200 | |
|---|---|---|
| committer | 2022-04-01 22:54:49 +0200 | |
| commit | 032558585047fcde3a874319b1d6dd8c5044d911 (patch) | |
| tree | efed5a2e8403bb7a4176f49c649a4d5ca424c78b /build.zig | |
| parent | zigmod: add a description (diff) | |
| download | zig-sqlite-032558585047fcde3a874319b1d6dd8c5044d911.tar.gz zig-sqlite-032558585047fcde3a874319b1d6dd8c5044d911.tar.xz zig-sqlite-032558585047fcde3a874319b1d6dd8c5044d911.zip | |
build: only include the 'c' directory if we're using the bundled sqlite code
Diffstat (limited to '')
| -rw-r--r-- | build.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -217,7 +217,7 @@ pub fn build(b: *std.build.Builder) !void { | |||
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | const lib = b.addStaticLibrary("zig-sqlite", "sqlite.zig"); | 219 | const lib = b.addStaticLibrary("zig-sqlite", "sqlite.zig"); |
| 220 | lib.addIncludeDir("c"); | 220 | if (bundled) lib.addIncludeDir("c"); |
| 221 | linkSqlite(lib); | 221 | linkSqlite(lib); |
| 222 | lib.setTarget(cross_target); | 222 | lib.setTarget(cross_target); |
| 223 | lib.setBuildMode(test_target.mode); | 223 | lib.setBuildMode(test_target.mode); |
| @@ -231,7 +231,7 @@ pub fn build(b: *std.build.Builder) !void { | |||
| 231 | tests.single_threaded = test_target.single_threaded; | 231 | tests.single_threaded = test_target.single_threaded; |
| 232 | tests.setBuildMode(test_target.mode); | 232 | tests.setBuildMode(test_target.mode); |
| 233 | tests.setTarget(cross_target); | 233 | tests.setTarget(cross_target); |
| 234 | tests.addIncludeDir("c"); | 234 | if (bundled) tests.addIncludeDir("c"); |
| 235 | linkSqlite(tests); | 235 | linkSqlite(tests); |
| 236 | 236 | ||
| 237 | const tests_options = b.addOptions(); | 237 | const tests_options = b.addOptions(); |