From d8bd8308f8a0139711ea7d801eeae4ab2228c528 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Tue, 10 Nov 2020 21:35:19 +0100 Subject: 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 Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util') diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index f2d5c7562d..06141cf69e 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -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") -- cgit v1.2.3