diff options
author | Alex Neundorf <neundorf@kde.org> | 2013-06-28 19:40:16 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2013-06-28 19:40:16 (GMT) |
commit | ba0e06f250665ee985bb6e94dbee3ca8009b60a7 (patch) | |
tree | ba7185d7a6527948d45e07dd187538c19a6f021a /Source/cmQtAutomoc.cxx | |
parent | daaf6283f5c0e8b7ea7ee93f983ad56d4498788d (diff) | |
download | CMake-ba0e06f250665ee985bb6e94dbee3ca8009b60a7.zip CMake-ba0e06f250665ee985bb6e94dbee3ca8009b60a7.tar.gz CMake-ba0e06f250665ee985bb6e94dbee3ca8009b60a7.tar.bz2 |
automoc: add a global AUTOMOC_TARGETS_FOLDER property
This has been requested, along with a patch, by Shaun Williams
in http://public.kitware.com/Bug/view.php?id=13788 .
It adds a global property AUTOMOC_TARGETS_FOLDER, which can
be used to group the automoc targets together in a folder e.g.
in Visual Studio.
Alex
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r-- | Source/cmQtAutomoc.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 05c43c4..34b3c7e 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -255,8 +255,18 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) automocTargetName.c_str(), true, workingDirectory.c_str(), depends, commandLines, false, automocComment.c_str()); - // inherit FOLDER property from target (#13688) - copyTargetProperty(automocTarget, target, "FOLDER"); + // Set target folder + const char* automocFolder = makefile->GetCMakeInstance()->GetProperty( + "AUTOMOC_TARGETS_FOLDER"); + if (automocFolder && *automocFolder) + { + automocTarget->SetProperty("FOLDER", automocFolder); + } + else + { + // inherit FOLDER property from target (#13688) + copyTargetProperty(automocTarget, target, "FOLDER"); + } target->AddUtility(automocTargetName.c_str()); } |