Merge branch 'case-insensitive-bindir-detection' into release

This commit is contained in:
Brad King 2017-01-20 11:53:24 -05:00
commit 2b1cdd85b8

View File

@ -1979,7 +1979,8 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
// Install tree has
// - "<prefix><CMAKE_BIN_DIR>/cmake"
// - "<prefix><CMAKE_DATA_DIR>"
if (cmHasSuffix(exe_dir, CMAKE_BIN_DIR)) {
const std::string actual_case = cmSystemTools::GetActualCaseForPath(exe_dir);
if (cmHasSuffix(actual_case, CMAKE_BIN_DIR)) {
std::string const prefix =
exe_dir.substr(0, exe_dir.size() - strlen(CMAKE_BIN_DIR));
cmSystemToolsCMakeRoot = prefix + CMAKE_DATA_DIR;