diff options
author | Brad King <brad.king@kitware.com> | 2019-01-11 16:25:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-11 16:25:59 (GMT) |
commit | ddb5b097cd29e2e7fcddcb79c4e3ae8c64b0a5b3 (patch) | |
tree | da212dc5a024734ee2b676fc9f08895007dc3699 /Source | |
parent | 91fa6a472cd262014a74d765b003bb1cc9d7ab8a (diff) | |
parent | dd39da551883bca5f8ec1be376a77f6d56666552 (diff) | |
download | CMake-ddb5b097cd29e2e7fcddcb79c4e3ae8c64b0a5b3.zip CMake-ddb5b097cd29e2e7fcddcb79c4e3ae8c64b0a5b3.tar.gz CMake-ddb5b097cd29e2e7fcddcb79c4e3ae8c64b0a5b3.tar.bz2 |
Merge branch 'backport-autogen_noqt_warning' into release-3.13
Merge-request: !2787
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 71e844e..5f7ff0b 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1500,6 +1500,31 @@ bool cmGlobalGenerator::QtAutoGen() auto qtVersion = cmQtAutoGenInitializer::GetQtVersion(target); // don't do anything if there is no Qt4 or Qt5Core (which contains moc) if (qtVersion.Major != 4 && qtVersion.Major != 5) { + std::string msg = "AUTOGEN: No valid Qt version found for target "; + msg += target->GetName(); + msg += ". "; + { + std::vector<std::string> lst; + if (mocEnabled) { + lst.emplace_back("AUTOMOC"); + } + if (uicEnabled) { + lst.emplace_back("AUTOUIC"); + } + if (rccEnabled) { + lst.emplace_back("AUTORCC"); + } + msg += cmJoin(lst, ", "); + } + msg += " disabled. "; + msg += "Consider adding:\n"; + if (uicEnabled) { + msg += " find_package(Qt5 COMPONENTS Widgets)\n"; + } else { + msg += " find_package(Qt5 COMPONENTS Core)\n"; + } + msg += "to your CMakeLists.txt file."; + target->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg); continue; } |