summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-20 16:47:51 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-11-20 16:47:51 (GMT)
commit5e0906629b2837bf641546ab46161c10603b73ba (patch)
treedcb05dfddb2bd62a5d1392765a85ccbfac88de4d /Source
parent6d85dce6f823c0c5032c534266abb693fdd9439e (diff)
parent3efe1d35f46fedbaaa81777201096808e660d518 (diff)
downloadCMake-5e0906629b2837bf641546ab46161c10603b73ba.zip
CMake-5e0906629b2837bf641546ab46161c10603b73ba.tar.gz
CMake-5e0906629b2837bf641546ab46161c10603b73ba.tar.bz2
Merge topic 'AutomocInheritFOLDERTargetProperty'
3efe1d3 Automoc: "inherit" FOLDER target property from target (#13688)
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutomoc.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 942c7ab..9423208 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -85,6 +85,18 @@ static std::string extractSubDir(const std::string& absPath,
}
+static void copyTargetProperty(cmTarget* destinationTarget,
+ cmTarget* sourceTarget,
+ const char* propertyName)
+{
+ const char* propertyValue = sourceTarget->GetProperty(propertyName);
+ if (propertyValue)
+ {
+ destinationTarget->SetProperty(propertyName, propertyValue);
+ }
+}
+
+
cmQtAutomoc::cmQtAutomoc()
:Verbose(cmsys::SystemTools::GetEnv("VERBOSE") != 0)
,ColorOutput(true)
@@ -152,9 +164,13 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
std::string automocComment = "Automoc for target ";
automocComment += targetName;
- makefile->AddUtilityCommand(automocTargetName.c_str(), true,
+ cmTarget* automocTarget = makefile->AddUtilityCommand(
+ automocTargetName.c_str(), true,
workingDirectory.c_str(), depends,
commandLines, false, automocComment.c_str());
+ // inherit FOLDER property from target (#13688)
+ copyTargetProperty(automocTarget, target, "FOLDER");
+
target->AddUtility(automocTargetName.c_str());
// configure a file to get all information to automoc at buildtime: