diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 3d8fdf5936..e693bebff2 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1979,7 +1979,8 @@ void cmSystemTools::FindCMakeResources(const char* argv0) // Install tree has // - "/cmake" // - "" - 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;