build: add support for Android NDK path configuration

This commit is contained in:
Elias Andualem
2026-02-21 18:07:03 +08:00
parent 2a81d8cd29
commit bd9611650f
10 changed files with 219 additions and 0 deletions

View File

@@ -20,6 +20,11 @@ pub fn build(b: *std.Build) !void {
try apple_sdk.addPaths(b, lib);
}
if (target.result.abi.isAndroid()) {
const android_ndk = @import("android_ndk");
try android_ndk.addPaths(b, lib);
}
var flags: std.ArrayList([]const u8) = .empty;
defer flags.deinit(b.allocator);
// Zig 0.13 bug: https://github.com/ziglang/zig/issues/20414

View File

@@ -5,5 +5,6 @@
.paths = .{""},
.dependencies = .{
.apple_sdk = .{ .path = "../apple-sdk" },
.android_ndk = .{ .path = "../android-ndk" },
},
}