pro2cmake.py: support for PAST_MAJOR_VERSIONS in qml_modules

maps qmake QML_PAST_MAJOR_VERSIONS to PAST_MAJOR_VERSIONS in cmake qml
modules, introduced in qtdeclarative qmltyperegistrar: Add
past-major-version option

Change-Id: Ifbee7c87318cc9dc7d7961db80cad518e67ecffe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Fawzi Mohamed 2020-11-10 21:35:19 +01:00
parent a299f337c5
commit d8bd8308f8

View File

@ -3904,6 +3904,11 @@ def write_plugin(cm_fh, scope, *, indent: int = 0) -> str:
extra.append(f'INSTALL_DIRECTORY "{target_path}"')
else:
extra.append("SKIP_INSTALL")
past_major_versions = scope.expandString("QML_PAST_MAJOR_VERSIONS")
if past_major_versions:
extra.append(f"PAST_MAJOR_VERSIONS {past_major_versions}")
if "qmltypes" in scope.get("CONFIG"):
extra.append("GENERATE_QMLTYPES")