Skip to content

Commit

Permalink
fix errror: detect build path (if exists)
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Mar 24, 2024
1 parent 6376a28 commit 0d98fea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ fn includeDeps(b: *std.Build, lib: *std.Build.Step.Compile) !void {
if (!std.mem.eql(u8, idf_path, "")) {
try searched_idf_include(b, lib, idf_path);
}
try searched_idf_libs(b, lib);
const build_exists = !std.meta.isError(std.fs.accessAbsolute(b.pathJoin(&.{ @src().file, "..", "build" }), .{}));
if (build_exists)
try searched_idf_libs(b, lib);

const home_dir = std.process.getEnvVarOwned(b.allocator, "HOME") catch "";
if (!std.mem.eql(u8, home_dir, "")) {
Expand Down

0 comments on commit 0d98fea

Please sign in to comment.