Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix location of atlmfc directory on MSVC 15+ #699

Merged
merged 1 commit into from Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/windows_registry.rs
Expand Up @@ -431,7 +431,7 @@ mod impl_ {
target: &str,
instance_path: &PathBuf,
) -> Option<Tool> {
let (bin_path, host_dylib_path, lib_path, include_path) =
let (root_path, bin_path, host_dylib_path, lib_path, include_path) =
vs15plus_vc_paths(target, instance_path)?;
let tool_path = bin_path.join(tool);
if !tool_path.exists() {
Expand All @@ -444,7 +444,7 @@ mod impl_ {
tool.libs.push(lib_path);
tool.include.push(include_path);

if let Some((atl_lib_path, atl_include_path)) = atl_paths(target, &bin_path) {
if let Some((atl_lib_path, atl_include_path)) = atl_paths(target, &root_path) {
tool.libs.push(atl_lib_path);
tool.include.push(atl_include_path);
}
Expand All @@ -457,7 +457,7 @@ mod impl_ {
fn vs15plus_vc_paths(
target: &str,
instance_path: &PathBuf,
) -> Option<(PathBuf, PathBuf, PathBuf, PathBuf)> {
) -> Option<(PathBuf, PathBuf, PathBuf, PathBuf, PathBuf)> {
let version_path =
instance_path.join(r"VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt");
let mut version_file = File::open(version_path).ok()?;
Expand Down Expand Up @@ -490,7 +490,7 @@ mod impl_ {
.join(&host.to_lowercase());
let lib_path = path.join("lib").join(&target);
let include_path = path.join("include");
Some((bin_path, host_dylib_path, lib_path, include_path))
Some((path, bin_path, host_dylib_path, lib_path, include_path))
}

fn atl_paths(target: &str, path: &Path) -> Option<(PathBuf, PathBuf)> {
Expand Down