Attached Files | a.patch [^] (1,455 bytes) 2012-11-16 15:24 [Show Content] [Hide Content]diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 942c7ab..4fe459c 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -85,6 +85,14 @@ static std::string extractSubDir(const std::string& absPath,
}
+void copyTargetProperty(cmTarget* destinationTarget,
+ cmTarget* sourceTarget,
+ const char* propertyName)
+{
+ destinationTarget->SetProperty(propertyName, sourceTarget->GetProperty(propertyName));
+}
+
+
cmQtAutomoc::cmQtAutomoc()
:Verbose(cmsys::SystemTools::GetEnv("VERBOSE") != 0)
,ColorOutput(true)
@@ -152,9 +160,14 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
std::string automocComment = "Automoc for target ";
automocComment += targetName;
- makefile->AddUtilityCommand(automocTargetName.c_str(), true,
- workingDirectory.c_str(), depends,
- commandLines, false, automocComment.c_str());
+ cmTarget* automocTarget = makefile->AddUtilityCommand(
+ automocTargetName.c_str(), true,
+ workingDirectory.c_str(), depends, commandLines,
+ false, automocComment.c_str());
+
+ // inherit some properties from target
+ copyTargetProperty(automocTarget, target, "FOLDER");
+
target->AddUtility(automocTargetName.c_str());
// configure a file to get all information to automoc at buildtime:
|