summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPathCommand.cxx
diff options
context:
space:
mode:
authorHarry Mallon <harry@codexdigital.com>2016-05-25 17:18:47 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-07 13:04:35 (GMT)
commit188baef00c3b19c6ee6ed8c3735817bae50f110e (patch)
tree420aad8b892720ef8049ea18493f39c3f73330c9 /Source/cmFindPathCommand.cxx
parenteeac8430bf014b4813f2326c9824acacdc0ea49a (diff)
downloadCMake-188baef00c3b19c6ee6ed8c3735817bae50f110e.zip
CMake-188baef00c3b19c6ee6ed8c3735817bae50f110e.tar.gz
CMake-188baef00c3b19c6ee6ed8c3735817bae50f110e.tar.bz2
find_path: Fix location of <dir/header.h> in a framework on OS X
After finding it in `foo.Framework/Headers/dir/header.h`, we should report the `foo.Framework/Headers` directory, not `foo.Framework/Headers/dir`, because the former is what actually contains the path the caller wishes to include.
Diffstat (limited to 'Source/cmFindPathCommand.cxx')
-rw-r--r--Source/cmFindPathCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index d24be6a..d71fc1a 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -117,7 +117,7 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string const& file,
if (this->IncludeFileInPath) {
return fheader;
}
- fheader = cmSystemTools::GetFilenamePath(fheader);
+ fheader.resize(fheader.size() - file.size());
return fheader;
}
return "";