Commit 9d456389 authored by Alexander Neundorf's avatar Alexander Neundorf

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

Alex
parent 129a3e9f
......@@ -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()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment