remove $INCLUDE/$LIB hack for mingw
mingw is not msvc, and nobody in their right mind would expect it to behave like it. [ChangeLog][Important Behavior Changes][qmake] Qt configure and qmake used with a MinGW spec will no longer emulate MSVC by picking up the INCLUDE and LIB environment variables. Use the -I/-L configure options to pass additional paths, as you would under Unix. Change-Id: I533bb97de34d14dcbd45e0416283a79f44096c67 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
6ea636b0bd
commit
03ae6ad8e9
@ -3042,16 +3042,6 @@ void Configure::generateOutputVars()
|
||||
if (!qmakeStylePlugins.isEmpty())
|
||||
qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(' ');
|
||||
|
||||
if (dictionary["QMAKESPEC"].endsWith("-g++")) {
|
||||
QString includepath = qgetenv("INCLUDE");
|
||||
const bool hasSh = !QStandardPaths::findExecutable(QStringLiteral("sh.exe")).isEmpty();
|
||||
QChar separator = (!includepath.contains(":\\") && hasSh ? QChar(':') : QChar(';'));
|
||||
qmakeVars += QString("TMPPATH = $$quote($$(INCLUDE))");
|
||||
qmakeVars += QString("QMAKE_INCDIR_POST += $$split(TMPPATH,\"%1\")").arg(separator);
|
||||
qmakeVars += QString("TMPPATH = $$quote($$(LIB))");
|
||||
qmakeVars += QString("QMAKE_LIBDIR_POST += $$split(TMPPATH,\"%1\")").arg(separator);
|
||||
}
|
||||
|
||||
if (!dictionary[ "QMAKESPEC" ].length()) {
|
||||
cout << "Configure could not detect your compiler. QMAKESPEC must either" << endl
|
||||
<< "be defined as an environment variable, or specified as an" << endl
|
||||
|
@ -611,9 +611,9 @@ QStringList Environment::headerPaths(Compiler compiler)
|
||||
foreach (const QFileInfo &version, mingwLibDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot))
|
||||
headerPaths += version.absoluteFilePath() + QLatin1String("/include");
|
||||
}
|
||||
} else {
|
||||
headerPaths = splitPathList(QString::fromLocal8Bit(getenv("INCLUDE")));
|
||||
}
|
||||
// MinGW: Although gcc doesn't care about INCLUDE, qmake automatically adds it via -I
|
||||
headerPaths += splitPathList(QString::fromLocal8Bit(getenv("INCLUDE")));
|
||||
|
||||
// Add Direct X SDK for ANGLE
|
||||
const QString directXSdk = detectDirectXSdk();
|
||||
@ -627,9 +627,9 @@ QStringList Environment::libraryPaths(Compiler compiler)
|
||||
QStringList libraryPaths;
|
||||
if (compiler == CC_MINGW) {
|
||||
libraryPaths = mingwPaths(detectMinGW(), "lib");
|
||||
} else {
|
||||
libraryPaths = splitPathList(QString::fromLocal8Bit(qgetenv("LIB")));
|
||||
}
|
||||
// MinGW: Although gcc doesn't care about LIB, qmake automatically adds it via -L
|
||||
libraryPaths += splitPathList(QString::fromLocal8Bit(qgetenv("LIB")));
|
||||
|
||||
// Add Direct X SDK for ANGLE
|
||||
const QString directXSdk = detectDirectXSdk();
|
||||
|
Loading…
Reference in New Issue
Block a user