Browse Source

Merge topic 'case-insensitive-bindir-detection'

7f0a21a5 cmSystemTools: use the actual case for root detection
Brad King 8 years ago
parent
commit
0f891007a9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/cmSystemTools.cxx

+ 2 - 1
Source/cmSystemTools.cxx

@@ -2015,7 +2015,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;