ENH: add error checking for mmesa

This commit is contained in:
Bill Hoffman 2002-03-26 12:55:14 -05:00
parent 7fc14a9cb4
commit d198c5e072
1 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,17 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args)
return false;
}
const char* inputDir = args[0].c_str();
std::string glh = inputDir;
glh += "/";
glh += "gl.h";
if(!cmSystemTools::FileExists(glh.c_str()))
{
std::string e = "Bad path to Mesa, could not find: ";
e += glh;
e += " ";
this->SetError(e.c_str());
return false;
}
const char* destDir = args[1].c_str();
std::vector<std::string> files;
cmSystemTools::Glob(inputDir, "\\.h$", files);