ENH: also process "~" and paths relative to CMAKE_CURRENT_SOURCE_DIR in Foo_DIR

Alex
This commit is contained in:
Alexander Neundorf 2007-08-20 08:49:21 -04:00
parent 129a3e9f9e
commit 9d45638988
1 changed files with 7 additions and 0 deletions

View File

@ -186,8 +186,15 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
if(!cmSystemTools::IsOff(def))
{
std::string f = def;
cmSystemTools::ConvertToUnixSlashes(f);
f += "/";
f += this->Config;
if(!cmSystemTools::FileIsFullPath(f.c_str()))
{
f = "/" + f;
f = this->Makefile->GetCurrentDirectory() + f;
}
if(cmSystemTools::FileExists(f.c_str()))
{
if(this->ReadListFile(f.c_str()))