|
|
@@ -1203,28 +1203,21 @@ std::string cmQtAutoGenerators::GetRccExecutable(cmTarget const* target)
|
|
|
return std::string();
|
|
|
}
|
|
|
|
|
|
-static cmGlobalGenerator* CreateGlobalGenerator(cmake* cm,
|
|
|
- const std::string& targetDirectory)
|
|
|
+bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
|
|
|
+ const std::string& config)
|
|
|
{
|
|
|
+ bool success = true;
|
|
|
+ cmake cm;
|
|
|
+ cm.SetHomeOutputDirectory(targetDirectory);
|
|
|
+ cm.SetHomeDirectory(targetDirectory);
|
|
|
cmGlobalGenerator* gg = new cmGlobalGenerator();
|
|
|
- gg->SetCMakeInstance(cm);
|
|
|
+ gg->SetCMakeInstance(&cm);
|
|
|
|
|
|
cmLocalGenerator* lg = gg->MakeLocalGenerator();
|
|
|
lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
|
|
|
lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
|
|
|
gg->SetCurrentLocalGenerator(lg);
|
|
|
|
|
|
- return gg;
|
|
|
-}
|
|
|
-
|
|
|
-bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
|
|
|
- const std::string& config)
|
|
|
-{
|
|
|
- bool success = true;
|
|
|
- cmake cm;
|
|
|
- cm.SetHomeOutputDirectory(targetDirectory);
|
|
|
- cm.SetHomeDirectory(targetDirectory);
|
|
|
- cmGlobalGenerator* gg = CreateGlobalGenerator(&cm, targetDirectory);
|
|
|
cmMakefile* makefile = gg->GetCurrentLocalGenerator()->GetMakefile();
|
|
|
|
|
|
this->ReadAutogenInfoFile(makefile, targetDirectory, config);
|