Skip to content

Commit

Permalink
Fix hardcoded path to link.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
UK992 committed Feb 3, 2017
1 parent fb7f65f commit a5ce630
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/script/build.rs
Expand Up @@ -37,7 +37,9 @@ fn main() {
// for reasons that I don't understand. If we just give
// link.exe, it tries to use script-*/out/link.exe, which of
// course does not exist.
build.define("CMAKE_LINKER", "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\link.exe");
let link = std::process::Command::new("where").arg("link.exe").output().unwrap();
let link_path: Vec<&str> = std::str::from_utf8(&link.stdout).unwrap().split("\r\n").collect();
build.define("CMAKE_LINKER", link_path[0]);
}

build.build();
Expand Down
2 changes: 1 addition & 1 deletion mach.bat
Expand Up @@ -2,7 +2,7 @@

SET VS_VCVARS=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat
IF EXIST "%VS_VCVARS%" (
IF NOT DEFINED VisualStudioVersion (
IF NOT DEFINED Platform (
IF EXIST "%ProgramFiles(x86)%" (
call "%VS_VCVARS%" x64
) ELSE (
Expand Down

0 comments on commit a5ce630

Please sign in to comment.