summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-20 11:54:37 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2017-01-20 11:54:37 -0500
commit0f891007a902a79acf746479f6bfe19b96899cef (patch)
tree8336c4ad74b71b46deeb4d98ab767e17b548f8c3
parent395f01ef728b3c41b2cab020aff381814244ebe1 (diff)
parent7f0a21a51eb483c523a2c8880ce4e0466251ec74 (diff)
downloadcmake-0f891007a902a79acf746479f6bfe19b96899cef.tar.gz
Merge topic 'case-insensitive-bindir-detection'
7f0a21a5 cmSystemTools: use the actual case for root detection
-rw-r--r--Source/cmSystemTools.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index a635bf4162..9efc13b14f 100644
--- a/Source/cmSystemTools.cxx
+++ b/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;