From d5cb44cd3a2169d7c479d1f53d69544b9109f003 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 14 May 2020 11:52:58 +0200 Subject: [PATCH] pro2cmake: Fix Scope.get_string for list values QMake variables are always string lists, but some variables are used to represent single string values. People tend to fill those variables with multiple values and expect them to be joined by spaces. Exhibit A: qtdeclarative/tools/qml/qml.pro QMAKE_TARGET_DESCRIPTION = QML Runtime QMake supports this for many values. Do the same for Scope.get_string(). Change-Id: I6af22bc1bfed07a4d8eac94d7315051a5bcb7a4d Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index cd43e2957e..1638fede08 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1311,7 +1311,8 @@ class Scope(object): v = self.get(key, inherit=inherit) if len(v) == 0: return default - assert len(v) == 1 + if len(v) > 1: + return ' '.join(v) return v[0] def _map_files(