summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutomoc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r--Source/cmQtAutomoc.cxx8
1 files changed, 8 insertions, 0 deletions
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(