diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-09 16:35:38 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-09 16:35:38 (GMT) |
commit | cb95c0a5bc86387a518002d842ffe22b9ad67958 (patch) | |
tree | acd109e096223c5ccfd1d568c6ea9fe40278a792 /Source/cmFindPathCommand.cxx | |
parent | 6503a0eecce984c3c5ede6f0d1f4951a14f9cc3f (diff) | |
download | CMake-cb95c0a5bc86387a518002d842ffe22b9ad67958.zip CMake-cb95c0a5bc86387a518002d842ffe22b9ad67958.tar.gz CMake-cb95c0a5bc86387a518002d842ffe22b9ad67958.tar.bz2 |
ENH: fix a bug in the find path stuff so that it can find headers deep in frameworks
Diffstat (limited to 'Source/cmFindPathCommand.cxx')
-rw-r--r-- | Source/cmFindPathCommand.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 6ece32a..eecdfa1 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -164,24 +164,24 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string& file, return fpath; } } - // if it is not found yet or not a framework header, then do a glob search - // for all files in dir/*/Headers/ - cmStdString glob = dir; - glob += "/*/Headers/"; - glob += file; - cmGlob globIt; - globIt.FindFiles(glob); - std::vector<std::string> files = globIt.GetFiles(); - if(files.size()) + } + // if it is not found yet or not a framework header, then do a glob search + // for all files in dir/*/Headers/ + cmStdString glob = dir; + glob += "/*/Headers/"; + glob += file; + cmGlob globIt; + globIt.FindFiles(glob); + std::vector<std::string> files = globIt.GetFiles(); + if(files.size()) + { + cmStdString fheader = cmSystemTools::CollapseFullPath(files[0].c_str()); + if(this->IncludeFileInPath) { - cmStdString fheader = cmSystemTools::CollapseFullPath(files[0].c_str()); - if(this->IncludeFileInPath) - { - return fheader; - } - fheader = cmSystemTools::GetFilenamePath(fheader); return fheader; } + fheader = cmSystemTools::GetFilenamePath(fheader); + return fheader; } return ""; } |