From 8878bea7b6a157948bb7c806523b1cfa4c9f7af8 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 21:09:16 +0200 Subject: [PATCH] cmake: Initialize Home directories on cmake for find-package mode. The Home directories can be used to initialize cmMakefile directories internally. --- Source/cmake.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bf05b18d3..f0fc4f0f4 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());