diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index c088f43280..4f5af3a4fa 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -582,20 +582,14 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) notIncludedMocs, includedUis); // Generate files - if (!this->MocExecutable.empty()) { - if (!this->MocGenerateAll(includedMocs, notIncludedMocs)) { - return false; - } + if (!this->MocGenerateAll(includedMocs, notIncludedMocs)) { + return false; } - if (!this->UicExecutable.empty()) { - if (!this->UicGenerateAll(includedUis)) { - return false; - } + if (!this->UicGenerateAll(includedUis)) { + return false; } - if (!this->RccExecutable.empty()) { - if (!this->QrcGenerateAll()) { - return false; - } + if (!this->QrcGenerateAll()) { + return false; } return true; @@ -994,6 +988,10 @@ bool cmQtAutoGenerators::MocGenerateAll( const std::map& includedMocs, const std::map& notIncludedMocs) { + if (this->MocExecutable.empty()) { + return true; + } + // look for name collisions { std::multimap collisions; @@ -1179,6 +1177,10 @@ bool cmQtAutoGenerators::MocGenerateFile(const std::string& sourceFile, bool cmQtAutoGenerators::UicGenerateAll( const std::map >& includedUis) { + if (this->UicExecutable.empty()) { + return true; + } + // single map with input / output names std::map > uiGenMap; std::map testMap; @@ -1304,6 +1306,10 @@ bool cmQtAutoGenerators::UicGenerateFile(const std::string& realName, bool cmQtAutoGenerators::QrcGenerateAll() { + if (this->RccExecutable.empty()) { + return true; + } + // generate single map with input / output names std::map qrcGenMap; for (std::vector::const_iterator si = this->RccSources.begin();