From 5c88141ed0b25d8ab9318bf4cb5dda54b90b2ce1 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 7 Jan 2011 07:56:19 +0100 Subject: Added support for rvct_linker config in qmake's MinGW generator. RevBy: Trust me --- qmake/generators/win32/mingw_make.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 8450eaf..648776d 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -368,17 +368,25 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t) t << "LIBS = "; if(!project->values("QMAKE_LIBDIR").isEmpty()) writeLibDirPart(t); - t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' ' - << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl; + if (project->isActiveConfig("rvct_linker")) { + t << var("QMAKE_LIBS") << ' ' + << var("QMAKE_LIBS_PRIVATE") << endl; + } else { + t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' ' + << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl; + } } } void MingwMakefileGenerator::writeLibDirPart(QTextStream &t) { QStringList libDirs = project->values("QMAKE_LIBDIR"); + QString libArg = QString::fromLatin1("-L"); + if (project->isActiveConfig("rvct_linker")) + libArg = QString::fromLatin1("--userlibpath "); for (int i = 0; i < libDirs.size(); ++i) libDirs[i].remove("\""); - t << valGlue(libDirs,"-L"+quote,quote+" -L" +quote,quote) << " "; + t << valGlue(libDirs, libArg+quote, quote+" "+libArg+quote, quote) << " "; } void MingwMakefileGenerator::writeObjectsPart(QTextStream &t) -- cgit v0.12