diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2019-01-30 14:16:40 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2019-01-30 15:46:40 (GMT) |
commit | 2df6d69014c8f8c0191dbf30d8c406225edbef3e (patch) | |
tree | abc023b7fe642d97122fe20d652be89c29c1943b /Source | |
parent | b598dfb65edd75e0da763d36dcdc3d19016a8d27 (diff) | |
download | CMake-2df6d69014c8f8c0191dbf30d8c406225edbef3e.zip CMake-2df6d69014c8f8c0191dbf30d8c406225edbef3e.tar.gz CMake-2df6d69014c8f8c0191dbf30d8c406225edbef3e.tar.bz2 |
AutoGen: query Qt5 version from directory properties
This allows functions which enable AutoGen to make the version variables
available at generate time.
See: #18732
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index f9c8c7f..90111801 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1281,6 +1281,12 @@ cmQtAutoGenInitializer::IntegerVersion cmQtAutoGenInitializer::GetQtVersion( if (qtMajor.empty()) { qtMajor = makefile->GetSafeDefinition("Qt5Core_VERSION_MAJOR"); } + if (qtMajor.empty()) { + const char* dirprop = makefile->GetProperty("Qt5Core_VERSION_MAJOR"); + if (dirprop) { + qtMajor = dirprop; + } + } { const char* targetQtVersion = target->GetLinkInterfaceDependentStringProperty("QT_MAJOR_VERSION", ""); @@ -1294,6 +1300,12 @@ cmQtAutoGenInitializer::IntegerVersion cmQtAutoGenInitializer::GetQtVersion( if (!qtMajor.empty()) { if (qtMajor == "5") { qtMinor = makefile->GetSafeDefinition("Qt5Core_VERSION_MINOR"); + if (qtMinor.empty()) { + const char* dirprop = makefile->GetProperty("Qt5Core_VERSION_MINOR"); + if (dirprop) { + qtMinor = dirprop; + } + } } if (qtMinor.empty()) { qtMinor = makefile->GetSafeDefinition("QT_VERSION_MINOR"); |