fix: issue with using prebuilt libs
This commit is contained in:
parent
e12c5ac8f3
commit
df3b636f35
2 changed files with 3 additions and 5 deletions
|
|
@ -28,9 +28,7 @@ pub fn build(b: *std.Build) !void {
|
|||
const libtemporal_dep = b.lazyDependency("libtemporal", .{});
|
||||
if (libtemporal_dep) |dep| {
|
||||
const lib_file_candidate = dep.path(prebuilt_lib_path);
|
||||
const lib_full_path = b.fmt("{f}", .{lib_file_candidate});
|
||||
if (std.Io.Dir.cwd().openFile(b.graph.io, lib_full_path, .{})) |lib_check_file| {
|
||||
lib_check_file.close(b.graph.io);
|
||||
if (dep.builder.root.access(b.graph.io, prebuilt_lib_path, .{})) {
|
||||
prebuilt_lib_file = lib_file_candidate;
|
||||
} else |_| {}
|
||||
}
|
||||
|
|
@ -40,7 +38,7 @@ pub fn build(b: *std.Build) !void {
|
|||
// std.debug.print("Using pre-built temporal_capi library from downloaded artifact at: {s}\n", .{prebuilt_lib_path});
|
||||
selected_lib_file = plf;
|
||||
} else {
|
||||
// std.debug.print("building from source: {s}\n", .{prebuilt_lib_path});
|
||||
// std.debug.print("building from source: {s}\n searched for prebuild at: {s}\n", .{ prebuilt_lib_path, prebuilt_lib_path });
|
||||
const build_crab = @import("build_crab");
|
||||
const build_dir = build_crab.addCargoBuild(
|
||||
b,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
},
|
||||
.libtemporal = .{
|
||||
.url = "https://github.com/nurulhudaapon/temporalz/releases/download/v0.2.3/libtemporal.tar.gz",
|
||||
.hash = "N-V-__8AAIwh2AUYrkLbf6RU87sNN1tKAQ4qt1kqOwZXNld8",
|
||||
.hash = "N-V-__8AADYZ_AXnqpmkTa49ZQ6lEQlDXWRLthyxEbgse3Hi",
|
||||
.lazy = true,
|
||||
},
|
||||
.build_crab = .{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue