From 6233d751cfd7cad21436dc07c8e999362f34b4fe Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 29 Dec 2020 23:04:52 -0800 Subject: [PATCH] set output dir for all exes --- zig-ecs/build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zig-ecs/build.zig b/zig-ecs/build.zig index 1fb580d..28a67cb 100644 --- a/zig-ecs/build.zig +++ b/zig-ecs/build.zig @@ -20,6 +20,7 @@ pub fn build(b: *Builder) void { var exe = b.addExecutable(name, source); exe.setBuildMode(b.standardReleaseOptions()); + exe.setOutputDir(std.fs.path.join(b.allocator, &[_][]const u8{ b.cache_root, "bin" }) catch unreachable); exe.addPackagePath("ecs", "src/ecs.zig"); exe.linkSystemLibrary("c"); @@ -29,7 +30,6 @@ pub fn build(b: *Builder) void { // first element in the list is added as "run" so "zig build run" works if (i == 0) { - exe.setOutputDir(std.fs.path.join(b.allocator, &[_][]const u8{ b.cache_root, "bin" }) catch unreachable); const run_exe_step = b.step("run", b.fmt("run {}.zig", .{name})); run_exe_step.dependOn(&run_cmd.step); }