diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index de177e810..8e30cd409 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -186,8 +186,15 @@ bool cmFindPackageCommand::InitialPass(std::vector 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()))