diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-09-29 08:31:22 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-09-29 13:00:47 (GMT) |
commit | 1d7f099d9cf489872a70b7616ff644cd4a91a7ae (patch) | |
tree | feecd79956890f7a5677b5add49a0cf651eb6acf /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | e182ba735e17bd5625ddfe7f796a123a383ff02f (diff) | |
download | CMake-1d7f099d9cf489872a70b7616ff644cd4a91a7ae.zip CMake-1d7f099d9cf489872a70b7616ff644cd4a91a7ae.tar.gz CMake-1d7f099d9cf489872a70b7616ff644cd4a91a7ae.tar.bz2 |
Autogen: Add (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index c6f0a51..217865b 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -363,11 +363,14 @@ static void SetupAutoTargetMoc(cmQtAutoGenDigest const& digest, AddDefinitionEscaped(makefile, "_moc_depend_filters", GetSafeProperty(target, "AUTOMOC_DEPEND_FILTERS")); - if (QtVersionGreaterOrEqual(digest.QtVersionMajor, digest.QtVersionMinor, 5, - 8)) { - AddDefinitionEscaped( - makefile, "_moc_predefs_cmd", - makefile->GetSafeDefinition("CMAKE_CXX_COMPILER_PREDEFINES_COMMAND")); + // Compiler predefines + if (target->GetPropertyAsBool("AUTOMOC_COMPILER_PREDEFINES")) { + if (QtVersionGreaterOrEqual(digest.QtVersionMajor, digest.QtVersionMinor, + 5, 8)) { + AddDefinitionEscaped( + makefile, "_moc_predefs_cmd", + makefile->GetSafeDefinition("CMAKE_CXX_COMPILER_PREDEFINES_COMMAND")); + } } // Moc includes and compile definitions { |