summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGeneratorInitializer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index de70d34..a443934 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -650,14 +650,10 @@ static void RccSetupAutoTarget(cmGeneratorTarget const* target)
void cmQtAutoGeneratorInitializer::InitializeAutogenSources(
cmGeneratorTarget* target)
{
- cmMakefile* makefile = target->Target->GetMakefile();
-
if (target->GetPropertyAsBool("AUTOMOC")) {
- std::string automocTargetName = GetAutogenTargetName(target);
- std::string mocCppFile = makefile->GetCurrentBinaryDirectory();
- mocCppFile += "/";
- mocCppFile += automocTargetName;
- mocCppFile += ".cpp";
+ cmMakefile* makefile = target->Target->GetMakefile();
+ std::string mocCppFile = GetAutogenTargetBuildDir(target);
+ mocCppFile += "moc_compilation.cpp";
makefile->GetOrCreateSource(mocCppFile, true);
makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES", mocCppFile.c_str(),
false);