diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-05-13 08:25:46 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-05-13 08:25:46 (GMT) |
commit | b95fbbe55328d583f77280eca862a7951d19d836 (patch) | |
tree | c1c70b54dab3e0b4278b66066e4b0b94cb33734c | |
parent | ab39dd11f5ba134b56dc802584f33c2c46df7f09 (diff) | |
download | CMake-b95fbbe55328d583f77280eca862a7951d19d836.zip CMake-b95fbbe55328d583f77280eca862a7951d19d836.tar.gz CMake-b95fbbe55328d583f77280eca862a7951d19d836.tar.bz2 |
Autogen: Add -DWIN32 to definitions list on demand
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 15d206a..d40e809 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -396,6 +396,14 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( if (this->MocEnabled()) { InfoGet(makefile, "AM_MOC_SKIP", this->MocSkipList); InfoGet(makefile, "AM_MOC_DEFINITIONS", config, this->MocDefinitions); +#ifdef _WIN32 + { + const std::string win32("WIN32"); + if (!ListContains(this->MocDefinitions, win32)) { + this->MocDefinitions.push_back(win32); + } + } +#endif InfoGet(makefile, "AM_MOC_INCLUDES", config, this->MocIncludePaths); InfoGet(makefile, "AM_MOC_OPTIONS", this->MocOptions); InfoGet(makefile, "AM_MOC_RELAXED_MODE", this->MocRelaxedMode); @@ -1221,9 +1229,6 @@ bool cmQtAutoGenerators::MocGenerateAll( this->MocDefinitions.begin(); it != this->MocDefinitions.end(); ++it) { cmd.push_back("-D" + (*it)); -#ifdef _WIN32 - cmd.push_back("-DWIN32"); -#endif } // Add options cmd.insert(cmd.end(), this->MocOptions.begin(), @@ -1369,9 +1374,6 @@ bool cmQtAutoGenerators::MocGenerateFile( it != this->MocDefinitions.end(); ++it) { cmd.push_back("-D" + (*it)); } -#ifdef _WIN32 - cmd.push_back("-DWIN32"); -#endif // Add options cmd.insert(cmd.end(), this->MocOptions.begin(), this->MocOptions.end()); // Add predefs include |