diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index 3c3f3f61d..a762fa14e 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -29,6 +29,17 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector 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 files; cmSystemTools::Glob(inputDir, "\\.h$", files);