Rename some variables to reflect broader scope.
This commit is contained in:
parent
97f1aa39da
commit
63378baa1c
|
@ -206,7 +206,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
|
||||||
cmMakefile* makefile = target->GetMakefile();
|
cmMakefile* makefile = target->GetMakefile();
|
||||||
const char* targetName = target->GetName();
|
const char* targetName = target->GetName();
|
||||||
|
|
||||||
// create a custom target for running automoc at buildtime:
|
// create a custom target for running generators at buildtime:
|
||||||
std::string autogenTargetName = targetName;
|
std::string autogenTargetName = targetName;
|
||||||
autogenTargetName += "_automoc";
|
autogenTargetName += "_automoc";
|
||||||
|
|
||||||
|
@ -230,8 +230,9 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
|
||||||
"", makefile->GetCurrentOutputDirectory());
|
"", makefile->GetCurrentOutputDirectory());
|
||||||
|
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
std::string automocComment = "Automoc for target ";
|
std::string tools = "moc";
|
||||||
automocComment += targetName;
|
std::string autogenComment = "Automatic " + tools + " for target ";
|
||||||
|
autogenComment += targetName;
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
bool usePRE_BUILD = false;
|
bool usePRE_BUILD = false;
|
||||||
|
@ -254,7 +255,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
|
||||||
// PRE_BUILD will work for an OBJECT_LIBRARY in this specific case.
|
// PRE_BUILD will work for an OBJECT_LIBRARY in this specific case.
|
||||||
std::vector<std::string> no_output;
|
std::vector<std::string> no_output;
|
||||||
cmCustomCommand cc(makefile, no_output, depends,
|
cmCustomCommand cc(makefile, no_output, depends,
|
||||||
commandLines, automocComment.c_str(),
|
commandLines, autogenComment.c_str(),
|
||||||
workingDirectory.c_str());
|
workingDirectory.c_str());
|
||||||
cc.SetEscapeOldStyle(false);
|
cc.SetEscapeOldStyle(false);
|
||||||
cc.SetEscapeAllowMakeVars(true);
|
cc.SetEscapeAllowMakeVars(true);
|
||||||
|
@ -263,21 +264,21 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
cmTarget* automocTarget = makefile->AddUtilityCommand(
|
cmTarget* autogenTarget = makefile->AddUtilityCommand(
|
||||||
autogenTargetName.c_str(), true,
|
autogenTargetName.c_str(), true,
|
||||||
workingDirectory.c_str(), depends,
|
workingDirectory.c_str(), depends,
|
||||||
commandLines, false, automocComment.c_str());
|
commandLines, false, autogenComment.c_str());
|
||||||
// Set target folder
|
// Set target folder
|
||||||
const char* automocFolder = makefile->GetCMakeInstance()->GetProperty(
|
const char* automocFolder = makefile->GetCMakeInstance()->GetProperty(
|
||||||
"AUTOMOC_TARGETS_FOLDER");
|
"AUTOMOC_TARGETS_FOLDER");
|
||||||
if (automocFolder && *automocFolder)
|
if (automocFolder && *automocFolder)
|
||||||
{
|
{
|
||||||
automocTarget->SetProperty("FOLDER", automocFolder);
|
autogenTarget->SetProperty("FOLDER", automocFolder);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// inherit FOLDER property from target (#13688)
|
// inherit FOLDER property from target (#13688)
|
||||||
copyTargetProperty(automocTarget, target, "FOLDER");
|
copyTargetProperty(autogenTarget, target, "FOLDER");
|
||||||
}
|
}
|
||||||
|
|
||||||
target->AddUtility(autogenTargetName.c_str());
|
target->AddUtility(autogenTargetName.c_str());
|
||||||
|
|
Loading…
Reference in New Issue