From 10c44e989aea8c28efdd8e7bb71abe98cfc4bed9 Mon Sep 17 00:00:00 2001 From: copygirl Date: Fri, 5 Apr 2024 18:56:48 +0200 Subject: [PATCH] Add flecs-zig-ble to dependencies --- README.md | 9 ++++++--- build.zig | 3 +++ build.zig.zon | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4cc6ddc..36f5a33 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,13 @@ With this project I'm learning new things and adding functionality step by step, ## Dependencies ```sh -mkdir -p libs && cd libs +mkdir -p libs +cd libs + # Clone zig-gamedev sparsely, only grabbing top-level files. git clone --sparse --filter=blob:none https://github.com/zig-gamedev/zig-gamedev.git # However, we also care about zmath, so check that out too. -cd zig-gamedev -git sparse-checkout add libs/zmath +git -C zig-gamedev sparse-checkout add libs/zmath + +git clone https://git.mcft.net/copygirl/flecs-zig-ble.git ``` diff --git a/build.zig b/build.zig index 05b1964..d4fd3fd 100644 --- a/build.zig +++ b/build.zig @@ -14,6 +14,7 @@ pub fn build(b: *std.Build) !void { }); const zigimg_dep = b.dependency("zigimg", .{ .target = target, .optimize = optimize }); const zmath_pkg = zmath.package(b, target, optimize, .{}); + const flecszigble_dep = b.dependency("flecs-zig-ble", .{ .target = target, .optimize = optimize }); const app = try mach.CoreApp.init(b, mach_dep.builder, .{ .name = "zig-bloxel-game", @@ -23,8 +24,10 @@ pub fn build(b: *std.Build) !void { .deps = &.{ .{ .name = "zigimg", .module = zigimg_dep.module("zigimg") }, .{ .name = "zmath", .module = zmath_pkg.zmath }, + .{ .name = "flecs-zig-ble", .module = flecszigble_dep.module("flecs-zig-ble") }, }, }); + app.compile.linkLibrary(flecszigble_dep.artifact("flecs-zig-ble")); if (b.args) |args| app.run.addArgs(args); const run_step = b.step("run", "Run the app"); diff --git a/build.zig.zon b/build.zig.zon index d959def..c87afb2 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -19,5 +19,6 @@ .hash = "122019f6439545235af116d0d8eb81fde1ff05fdb070da57c723772c557f84c5bf39", }, .zmath = .{ .path = "libs/zig-gamedev/libs/zmath" }, + .@"flecs-zig-ble" = .{ .path = "libs/flecs-zig-ble" }, }, }