mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
find_package: Explicitly normalize CONFIG file path as it exists on disk
This was missed in commit 9d44a77454 (find_*: Explicitly normalize found
paths as they exist on disk, 2024-10-17).
This commit is contained in:
@@ -2410,8 +2410,6 @@ bool cmFindPackageCommand::CheckDirectory(std::string const& dir)
|
||||
|
||||
// Look for the file in this directory.
|
||||
if (this->FindConfigFile(d, this->FileFound)) {
|
||||
// Remove duplicate slashes.
|
||||
cmSystemTools::ConvertToUnixSlashes(this->FileFound);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -2429,6 +2427,8 @@ bool cmFindPackageCommand::FindConfigFile(std::string const& dir,
|
||||
// Allow resolving symlinks when the config file is found through a link
|
||||
if (this->UseRealPath) {
|
||||
file = cmSystemTools::GetRealPath(file);
|
||||
} else {
|
||||
file = cmSystemTools::ToNormalizedPathOnDisk(file);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user