forked from qt-creator/qt-creator
setup {,x}qmakespec from environment as fallback
... like qmake does Change-Id: I4d0dedfea5efcd1b5df2c3043788edf4bbd5c5ad Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -206,6 +206,17 @@ void QMakeGlobals::commitCommandLineArguments(QMakeCmdLineParserState &state)
|
||||
xqmakespec = qmakespec;
|
||||
}
|
||||
|
||||
void QMakeGlobals::useEnvironment()
|
||||
{
|
||||
if (xqmakespec.isEmpty())
|
||||
xqmakespec = getEnv(QLatin1String("XQMAKESPEC"));
|
||||
if (qmakespec.isEmpty()) {
|
||||
qmakespec = getEnv(QLatin1String("QMAKESPEC"));
|
||||
if (xqmakespec.isEmpty())
|
||||
xqmakespec = qmakespec;
|
||||
}
|
||||
}
|
||||
|
||||
void QMakeGlobals::setCommandLineArguments(const QString &pwd, const QStringList &_args)
|
||||
{
|
||||
QStringList args = _args;
|
||||
@@ -214,6 +225,7 @@ void QMakeGlobals::setCommandLineArguments(const QString &pwd, const QStringList
|
||||
for (int pos = 0; pos < args.size(); pos++)
|
||||
addCommandLineArguments(state, args, &pos);
|
||||
commitCommandLineArguments(state);
|
||||
useEnvironment();
|
||||
}
|
||||
|
||||
void QMakeGlobals::setDirectories(const QString &input_dir, const QString &output_dir)
|
||||
|
@@ -115,6 +115,7 @@ public:
|
||||
QStringList &args, int *pos);
|
||||
void commitCommandLineArguments(QMakeCmdLineParserState &state);
|
||||
void setCommandLineArguments(const QString &pwd, const QStringList &args);
|
||||
void useEnvironment();
|
||||
void setDirectories(const QString &input_dir, const QString &output_dir);
|
||||
#ifdef PROEVALUATOR_INIT_PROPS
|
||||
bool initProperties();
|
||||
|
Reference in New Issue
Block a user