summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-28 19:23:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-28 19:23:09 (GMT)
commitfcbe435c235f4fe1e5444a796f085c7a796be88e (patch)
tree00e4f9eff8f5dc77251c61edbd8a81dbdefb48ad /Source/cmGlobalGenerator.cxx
parent16df2456a440d87fb3e8e53fb59a2817b288b9af (diff)
parent9c87d9cc3e7a046f79ff62eda81203ef424e4a14 (diff)
downloadCMake-fcbe435c235f4fe1e5444a796f085c7a796be88e.zip
CMake-fcbe435c235f4fe1e5444a796f085c7a796be88e.tar.gz
CMake-fcbe435c235f4fe1e5444a796f085c7a796be88e.tar.bz2
Merge topic 'Qt-auto-generators'
9c87d9c Add automatic rcc invocation for Qt. 84218e1 Add automatic uic invocation for Qt. 94a0ca6 Record which files are skipped by automoc. 18fb758 Run the main executable created in the autogen tests. e485ba1 Rename the QtAutomoc tests to QtAutogen. 7ce65c3 Add extra checks for the AUTOMOC target property. 32771fc Update output messages for generic use. f371ab5 Rename RunAutomoc to RunAutogen. 85b3d6e Extract an SetupAutoMocTarget method. ca124a1 Rename the AutomocInfo.cmake file to be more generic. a342c9f Move some makefile definitions up away from moc-specific code. 98632ef Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER. 63378ba Rename some variables to reflect broader scope. 97f1aa3 Rename method to reflect generic use. 4abb111 Rename local variable to reflect generic use. 03878c9 Move variable set to where it is used. ...
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5b0df2c..465763d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -18,7 +18,7 @@
#include "cmExternalMakefileProjectGenerator.h"
#include "cmake.h"
#include "cmMakefile.h"
-#include "cmQtAutomoc.h"
+#include "cmQtAutoGenerators.h"
#include "cmSourceFile.h"
#include "cmVersion.h"
#include "cmTargetExport.h"
@@ -1096,8 +1096,8 @@ void cmGlobalGenerator::Generate()
}
// Iterate through all targets and set up automoc for those which have
- // the AUTOMOC property set
- this->CreateAutomocTargets();
+ // the AUTOMOC, AUTOUIC or AUTORCC property set
+ this->CreateQtAutoGeneratorsTargets();
// For each existing cmLocalGenerator
unsigned int i;
@@ -1253,11 +1253,11 @@ bool cmGlobalGenerator::CheckTargets()
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::CreateAutomocTargets()
+void cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
{
#ifdef CMAKE_BUILD_WITH_CMAKE
- typedef std::vector<std::pair<cmQtAutomoc, cmTarget*> > Automocs;
- Automocs automocs;
+ typedef std::vector<std::pair<cmQtAutoGenerators, cmTarget*> > Autogens;
+ Autogens autogens;
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{
cmTargets& targets =
@@ -1272,21 +1272,24 @@ void cmGlobalGenerator::CreateAutomocTargets()
target.GetType() == cmTarget::MODULE_LIBRARY ||
target.GetType() == cmTarget::OBJECT_LIBRARY)
{
- if(target.GetPropertyAsBool("AUTOMOC") && !target.IsImported())
+ if((target.GetPropertyAsBool("AUTOMOC")
+ || target.GetPropertyAsBool("AUTOUIC")
+ || target.GetPropertyAsBool("AUTORCC"))
+ && !target.IsImported())
{
- cmQtAutomoc automoc;
- if(automoc.InitializeMocSourceFile(&target))
+ cmQtAutoGenerators autogen;
+ if(autogen.InitializeMocSourceFile(&target))
{
- automocs.push_back(std::make_pair(automoc, &target));
+ autogens.push_back(std::make_pair(autogen, &target));
}
}
}
}
}
- for (Automocs::iterator it = automocs.begin(); it != automocs.end();
+ for (Autogens::iterator it = autogens.begin(); it != autogens.end();
++it)
{
- it->first.SetupAutomocTarget(it->second);
+ it->first.SetupAutoGenerateTarget(it->second);
}
#endif
}