Skip to content

Commit bc62699

Browse files
Support Visual Studio 2019.
1 parent 7395c08 commit bc62699

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ impl Config {
415415
}
416416
if target.contains("x86_64") && !is_ninja && !using_nmake_generator {
417417
cmd.arg("-Thost=x64");
418+
cmd.arg("-DCMAKE_GENERATOR_PLATFORM=x64");
418419
}
419420
} else if target.contains("redox") {
420421
if !self.defined("CMAKE_SYSTEM_NAME") {
@@ -706,6 +707,7 @@ impl Config {
706707
use cc::windows_registry::{find_vs_version, VsVers};
707708

708709
let base = match find_vs_version() {
710+
Ok(VsVers::Vs16) => "Visual Studio 16 2019",
709711
Ok(VsVers::Vs15) => "Visual Studio 15 2017",
710712
Ok(VsVers::Vs14) => "Visual Studio 14 2015",
711713
Ok(VsVers::Vs12) => "Visual Studio 12 2013",
@@ -716,10 +718,8 @@ impl Config {
716718
),
717719
Err(msg) => panic!(msg),
718720
};
719-
if target.contains("i686") {
721+
if target.contains("i686") || target.contains("x86_64") {
720722
base.to_string()
721-
} else if target.contains("x86_64") {
722-
format!("{} Win64", base)
723723
} else {
724724
panic!("unsupported msvc target: {}", target);
725725
}

0 commit comments

Comments
 (0)