Skip to content

Commit

Permalink
Search for lib.exe in more paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Jan 14, 2025
1 parent 017aa7a commit 5ad0571
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wireguard-go-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,10 @@ fn find_lib_exe() -> anyhow::Result<PathBuf> {
// Find lib.exe relative to msbuild.exe, in ../../../../ relative to msbuild
let search_path = msbuild_exe
.ancestors()
.nth(3)
.nth(4)
.context("Unexpected msbuild.exe path")?;

// TODO: Make this arch agnostic (host AND target)
let path_is_lib_exe = |file: &Path| file.ends_with("Hostx64/x64/lib.exe");

find_file(search_path, &path_is_lib_exe)?.context("No lib.exe relative to msbuild.exe")
Expand Down

0 comments on commit 5ad0571

Please sign in to comment.