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>
|
||||
|
||||
|
@ -57,11 +57,16 @@ class CMakeParser:
|
||||
return result
|
||||
|
||||
def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
|
||||
versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
|
||||
# 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:
|
||||
return None
|
||||
versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
|
||||
try:
|
||||
f = open(versionFile, 'r')
|
||||
except:
|
||||
return None
|
||||
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
|
Loading…
Reference in New Issue
Block a user