summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-12-06 13:57:51 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-12-06 13:57:59 (GMT)
commita722316bcb20dd73d3da547882836d55a83b56c8 (patch)
treee369abdc7927e15f204e9436b9cc0cc8b48f9cbb /Source/cmQtAutoGenInitializer.cxx
parentc0aab7a84a680d576143d5730afd19b841d85772 (diff)
parent5f0f84c7e0630d7b8190c18badd5a68e2dd08ff7 (diff)
downloadCMake-a722316bcb20dd73d3da547882836d55a83b56c8.zip
CMake-a722316bcb20dd73d3da547882836d55a83b56c8.tar.gz
CMake-a722316bcb20dd73d3da547882836d55a83b56c8.tar.bz2
Merge topic 'autogen_uic_empty_fix'
5f0f84c7e0 Autogen: Don't add a WIN32 moc definition if we have a moc_predefs.h file 0814d74548 Autogen: Add QtAutogen.UicNoGui test 2ef640819f Autogen: Tests: Differentiate between Qt core and Qt gui tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2668
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r--Source/cmQtAutoGenInitializer.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 49236ed..70e77d7 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -521,6 +521,12 @@ bool cmQtAutoGenInitializer::InitMoc()
[this, localGen](std::string const& cfg) -> std::set<std::string> {
std::set<std::string> defines;
localGen->GetTargetDefines(this->Target, cfg, "CXX", defines);
+#ifdef _WIN32
+ if (this->Moc.PredefsCmd.empty()) {
+ // Add WIN32 definition if we don't have a moc_predefs.h
+ defines.insert("WIN32");
+ }
+#endif
return defines;
};