diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bf05b18d39..f0fc4f0f41 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -405,6 +405,11 @@ void cmake::ReadListFile(const std::vector& args, bool cmake::FindPackage(const std::vector& args) { + this->SetHomeDirectory + (cmSystemTools::GetCurrentWorkingDirectory()); + this->SetHomeOutputDirectory + (cmSystemTools::GetCurrentWorkingDirectory()); + // if a generator was not yet created, temporarily create one cmGlobalGenerator *gg = new cmGlobalGenerator; gg->SetCMakeInstance(this); @@ -413,12 +418,8 @@ bool cmake::FindPackage(const std::vector& args) // read in the list file to fill the cache cmsys::auto_ptr lg(gg->CreateLocalGenerator()); cmMakefile* mf = lg->GetMakefile(); - mf->SetHomeOutputDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); mf->SetStartOutputDirectory (cmSystemTools::GetCurrentWorkingDirectory()); - mf->SetHomeDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); mf->SetStartDirectory (cmSystemTools::GetCurrentWorkingDirectory());