This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 6fe404e26378f026f3d730dc985a933b09252e0d (commit) via 74b9392eb9311639612d175bdc1c811560495659 (commit) via 812dab067e5ea053ca36db6089507db7a5de437e (commit) from 8b14b365c5a7a71f461515093b8f8a4f1e55697c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fe404e26378f026f3d730dc985a933b09252e0d commit 6fe404e26378f026f3d730dc985a933b09252e0d Merge: 8b14b36 74b9392 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Wed Nov 9 17:28:49 2011 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Nov 9 17:28:49 2011 -0500 Merge topic 'automoc_qt5' into next 74b9392 Update comments and method names to not be Qt4 specific. 812dab0 Don't assume the existence of QT_MAJOR_VERSION. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74b9392eb9311639612d175bdc1c811560495659 commit 74b9392eb9311639612d175bdc1c811560495659 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Wed Nov 9 23:26:09 2011 +0100 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Wed Nov 9 23:26:09 2011 +0100 Update comments and method names to not be Qt4 specific. diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 045b439..861e5bb 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -49,7 +49,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) { cmMakefile* makefile = target->GetMakefile(); const char* targetName = target->GetName(); - // don't do anything if there is no Qt4: + // don't do anything if there is no Qt4 or Qt5SrcTools (which contains moc): std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR"); if (qtMajorVersion == "") { @@ -176,7 +176,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory) if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5") { - this->RunAutomocQt4(); + this->RunAutomoc(); } this->WriteOldMocDefinitionsFile(targetDirectory); @@ -380,7 +380,7 @@ void cmQtAutomoc::Init() } -bool cmQtAutomoc::RunAutomocQt4() +bool cmQtAutomoc::RunAutomoc() { if (!cmsys::SystemTools::FileExists(this->OutMocCppFilename.c_str()) || (this->OldMocDefinitionsStr != this->Join(this->MocDefinitions, ' '))) diff --git a/Source/cmQtAutomoc.h b/Source/cmQtAutomoc.h index c3550a4..59eaac7 100644 --- a/Source/cmQtAutomoc.h +++ b/Source/cmQtAutomoc.h @@ -35,7 +35,7 @@ private: const char* targetDirectory); void WriteOldMocDefinitionsFile(const char* targetDirectory); - bool RunAutomocQt4(); + bool RunAutomoc(); bool GenerateMoc(const std::string& sourceFile, const std::string& mocFileName); void ParseCppFile(const std::string& absFilename, http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=812dab067e5ea053ca36db6089507db7a5de437e commit 812dab067e5ea053ca36db6089507db7a5de437e Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Wed Nov 9 23:17:20 2011 +0100 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Wed Nov 9 23:20:20 2011 +0100 Don't assume the existence of QT_MAJOR_VERSION. Also handle Qt5SrcTools_MAJOR_VERSION. diff --git a/Modules/AutomocInfo.cmake.in b/Modules/AutomocInfo.cmake.in index 2dc3aa2..5d440fb 100644 --- a/Modules/AutomocInfo.cmake.in +++ b/Modules/AutomocInfo.cmake.in @@ -10,4 +10,5 @@ set(AM_QT_MOC_EXECUTABLE "@QT_MOC_EXECUTABLE@") set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/") set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/") set(AM_QT_VERSION_MAJOR "@QT_VERSION_MAJOR@" ) +set(AM_Qt5SrcTools_VERSION_MAJOR "@Qt5SrcTools_VERSION_MAJOR@" ) set(AM_TARGET_NAME "@_moc_target_name@") diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index fea2e79..045b439 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -51,6 +51,10 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) const char* targetName = target->GetName(); // don't do anything if there is no Qt4: std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR"); + if (qtMajorVersion == "") + { + qtMajorVersion = makefile->GetSafeDefinition("Qt5SrcTools_VERSION_MAJOR"); + } if (qtMajorVersion != "4" && qtMajorVersion != "5") { return; @@ -215,6 +219,10 @@ bool cmQtAutomoc::ReadAutomocInfoFile(cmMakefile* makefile, } this->QtMajorVersion = makefile->GetSafeDefinition("AM_QT_VERSION_MAJOR"); + if (this->QtMajorVersion == "") + { + this->QtMajorVersion = makefile->GetSafeDefinition("AM_Qt5SrcTools_VERSION_MAJOR"); + } this->Sources = makefile->GetSafeDefinition("AM_SOURCES"); this->Headers = makefile->GetSafeDefinition("AM_HEADERS"); this->IncludeProjectDirsBefore = makefile->IsOn( ----------------------------------------------------------------------- Summary of changes: Modules/AutomocInfo.cmake.in | 1 + Source/cmQtAutomoc.cxx | 14 +++++++++++--- Source/cmQtAutomoc.h | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits