diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-11-27 12:15:05 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-11-28 12:07:27 (GMT) |
commit | 5f0f84c7e0630d7b8190c18badd5a68e2dd08ff7 (patch) | |
tree | 519f7a100cb4971fb201797649629e9bebba3390 /Source/cmQtAutoGenInitializer.cxx | |
parent | 0814d74548cda4e2e10183ed84ed8d0c4ff058fb (diff) | |
download | CMake-5f0f84c7e0630d7b8190c18badd5a68e2dd08ff7.zip CMake-5f0f84c7e0630d7b8190c18badd5a68e2dd08ff7.tar.gz CMake-5f0f84c7e0630d7b8190c18badd5a68e2dd08ff7.tar.bz2 |
Autogen: Don't add a WIN32 moc definition if we have a moc_predefs.h file
On Windows systems we used to add a "-DWIN32" definition to the ``moc``
defines. This is not necessary anymore when we have a
``moc_predefs.h`` file that provides all compiler predefines.
Closes #18623
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 582faf6..86d7947 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; }; |