summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGen.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-01-14 16:33:03 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-01-15 08:52:35 (GMT)
commitf2f166133402ad5f7998e0fef93b04f56c2f6d07 (patch)
tree9df2037b372763877f19f7b54792dbc7c927396c /Source/cmQtAutoGen.cxx
parentb2343ff08682e23f61be27c4faf02f8e2c37abcf (diff)
downloadCMake-f2f166133402ad5f7998e0fef93b04f56c2f6d07.zip
CMake-f2f166133402ad5f7998e0fef93b04f56c2f6d07.tar.gz
CMake-f2f166133402ad5f7998e0fef93b04f56c2f6d07.tar.bz2
Autogen: Add and use QtAutoGen::Tools method
Diffstat (limited to 'Source/cmQtAutoGen.cxx')
-rw-r--r--Source/cmQtAutoGen.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index 000529d..9dc5fa8 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -99,6 +99,41 @@ std::string cmQtAutoGen::GeneratorNameUpper(GeneratorT genType)
return cmSystemTools::UpperCase(cmQtAutoGen::GeneratorName(genType));
}
+std::string cmQtAutoGen::Tools(bool moc, bool uic, bool rcc)
+{
+ std::string res;
+ std::vector<std::string> lst;
+ if (moc) {
+ lst.emplace_back("AUTOMOC");
+ }
+ if (uic) {
+ lst.emplace_back("AUTOUIC");
+ }
+ if (rcc) {
+ lst.emplace_back("AUTORCC");
+ }
+ switch (lst.size()) {
+ case 1:
+ res += lst.at(0);
+ break;
+ case 2:
+ res += lst.at(0);
+ res += " and ";
+ res += lst.at(1);
+ break;
+ case 3:
+ res += lst.at(0);
+ res += ", ";
+ res += lst.at(1);
+ res += " and ";
+ res += lst.at(2);
+ break;
+ default:
+ break;
+ }
+ return res;
+}
+
std::string cmQtAutoGen::Quoted(std::string const& text)
{
static const char* rep[18] = { "\\", "\\\\", "\"", "\\\"", "\a", "\\a",