diff options
author | Brad King <brad.king@kitware.com> | 2013-07-01 13:22:22 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-01 13:22:22 (GMT) |
commit | 5f36fa98ffd0258cbcd987c11127db1ffdf5404c (patch) | |
tree | 1df55754f1aa688d5efa44048d564369270dfb20 /Source | |
parent | 51406e25320cb31b270e0ce3d1e709dd91e46282 (diff) | |
parent | ba0e06f250665ee985bb6e94dbee3ca8009b60a7 (diff) | |
download | CMake-5f36fa98ffd0258cbcd987c11127db1ffdf5404c.zip CMake-5f36fa98ffd0258cbcd987c11127db1ffdf5404c.tar.gz CMake-5f36fa98ffd0258cbcd987c11127db1ffdf5404c.tar.bz2 |
Merge topic 'AddAutomocTargetFolder'
ba0e06f automoc: add a global AUTOMOC_TARGETS_FOLDER property
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutomoc.cxx | 14 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 4 | ||||
-rw-r--r-- | Source/cmake.cxx | 8 |
3 files changed, 23 insertions, 3 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()); } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b14db43..a90fa74 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -236,7 +236,9 @@ void cmTarget::DefineProperties(cmake *cm) "AUTOMOC_MOC_OPTIONS property.\n" "By setting the CMAKE_AUTOMOC_RELAXED_MODE variable to TRUE the rules " "for searching the files which will be processed by moc can be relaxed. " - "See the documentation for this variable for more details."); + "See the documentation for this variable for more details.\n" + "The global property AUTOMOC_TARGETS_FOLDER can be used to group the " + "automoc targets together in an IDE, e.g. in MSVS."); cm->DefineProperty ("AUTOMOC_MOC_OPTIONS", cmProperty::TARGET, diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 29d9bb3..5f7d1e9 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -3603,6 +3603,14 @@ void cmake::DefineProperties(cmake *cm) "for the FOLDER target property."); cm->DefineProperty + ("AUTOMOC_TARGETS_FOLDER", cmProperty::GLOBAL, + "Name of FOLDER for *_automoc targets that are added automatically by " + "CMake for targets for which AUTOMOC is enabled.", + "If not set, CMake uses the FOLDER property of the parent target as a " + "default value for this property. See also the documentation for the " + "FOLDER target property and the AUTOMOC target property."); + + cm->DefineProperty ("PREDEFINED_TARGETS_FOLDER", cmProperty::GLOBAL, "Name of FOLDER for targets that are added automatically by CMake.", "If not set, CMake uses \"CMakePredefinedTargets\" as a default " |