QtAutogen: Port away from cmLocalGenerator.

This commit is contained in:
Stephen Kelly 2015-09-26 19:41:31 +02:00 committed by Brad King
parent 59a729b2be
commit 1fe390201d

View File

@ -12,7 +12,7 @@
============================================================================*/ ============================================================================*/
#include "cmGlobalGenerator.h" #include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h" #include "cmOutputConverter.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cmState.h" #include "cmState.h"
@ -179,19 +179,18 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, snapshot)); cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, snapshot));
cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get())); mf->SetCurrentBinaryDirectory(targetDirectory);
lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory); mf->SetCurrentSourceDirectory(targetDirectory);
lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory); gg.SetCurrentMakefile(mf.get());
gg.SetCurrentMakefile(lg->GetMakefile());
this->ReadAutogenInfoFile(lg->GetMakefile(), targetDirectory, config); this->ReadAutogenInfoFile(mf.get(), targetDirectory, config);
this->ReadOldMocDefinitionsFile(lg->GetMakefile(), targetDirectory); this->ReadOldMocDefinitionsFile(mf.get(), targetDirectory);
this->Init(); this->Init();
if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5") if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
{ {
success = this->RunAutogen(lg->GetMakefile()); success = this->RunAutogen(mf.get());
} }
this->WriteOldMocDefinitionsFile(targetDirectory); this->WriteOldMocDefinitionsFile(targetDirectory);