forked from pool/cmake
Accepting request 935121 from home:cgiboudeaux:Qt6:release:cmake_fix
- Adapt cmake.prov for Qt >= 6.2.2 Upstream uses its own ConfigVersion implementation.Starting with Qt 6.2.2, 'PACKAGE_VERSION' is not defined in Qt6FooConfigVersion.cmake but in Qt6FooConfigVersionImpl.cmake. OBS-URL: https://build.opensuse.org/request/show/935121 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=477
This commit is contained in:
parent
2b889871ff
commit
2388ea9f48
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 1 16:36:36 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Adapt cmake.prov for Qt >= 6.2.2
|
||||||
|
Upstream uses its own ConfigVersion implementation.Starting with
|
||||||
|
Qt 6.2.2, 'PACKAGE_VERSION' is not defined in
|
||||||
|
Qt6FooConfigVersion.cmake but in Qt6FooConfigVersionImpl.cmake.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 18 20:25:16 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>
|
Thu Nov 18 20:25:16 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||||
|
|
||||||
|
@ -57,6 +57,11 @@ class CMakeParser:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
|
def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
|
||||||
|
# Qt >= 6.2.2 defines 'PACKAGE_VERSION' in *ConfigVersionImpl.cmake
|
||||||
|
versionFile = f"{modulePath}/{cmakeModule}ConfigVersionImpl.cmake" if "Qt6" in f"{cmakeModule}" else ""
|
||||||
|
try:
|
||||||
|
f = open(versionFile, 'r')
|
||||||
|
except:
|
||||||
versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
|
versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
|
||||||
try:
|
try:
|
||||||
f = open(versionFile, 'r')
|
f = open(versionFile, 'r')
|
||||||
|
Loading…
Reference in New Issue
Block a user