From 561ee92ede76bdcdba9ce6dbe42ec3de596d4117 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.vestbo@digia.com>
Date: Wed, 23 Oct 2013 14:02:59 +0200
Subject: [PATCH] qmake: Expose qmake arguments as QMAKE_ARGS

Allows project files or mkspecs to call qmake recursively using system()
with the right arguments, which we use to fix the ios default_post.prf.

Change-Id: I90d69e2b156bb0f0af1279188b11f81c84c24fb8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/1cdbe4752bef972db5471e811e9a781749cd0380)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
---
 src/shared/proparser/qmakeevaluator.cpp | 2 ++
 src/shared/proparser/qmakeglobals.h     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp
index d08282d4b1e..0df4406391a 100644
--- a/src/shared/proparser/qmakeevaluator.cpp
+++ b/src/shared/proparser/qmakeevaluator.cpp
@@ -975,6 +975,8 @@ void QMakeEvaluator::loadDefaults()
     vars[ProKey("_DATE_")] << ProString(QDateTime::currentDateTime().toString());
     if (!m_option->qmake_abslocation.isEmpty())
         vars[ProKey("QMAKE_QMAKE")] << ProString(m_option->qmake_abslocation);
+    if (!m_option->qmake_args.isEmpty())
+        vars[ProKey("QMAKE_ARGS")] = ProStringList(m_option->qmake_args);
 #if defined(Q_OS_WIN32)
     vars[ProKey("QMAKE_HOST.os")] << ProString("Windows");
 
diff --git a/src/shared/proparser/qmakeglobals.h b/src/shared/proparser/qmakeglobals.h
index 4e45f3fb6a9..0f2b37ed266 100644
--- a/src/shared/proparser/qmakeglobals.h
+++ b/src/shared/proparser/qmakeglobals.h
@@ -105,6 +105,7 @@ public:
     QProcessEnvironment environment;
 #endif
     QString qmake_abslocation;
+    QStringList qmake_args;
 
     QString qmakespec, xqmakespec;
     QString user_template, user_template_prefix;
-- 
GitLab