summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-01-07 07:24:41 (GMT)
committeraxis <qt-info@nokia.com>2011-01-28 12:25:13 (GMT)
commit3f00eed4c329670bf10640c43467cd122347e0d2 (patch)
tree4a5c36ef29ed56c26c175f6da51a283ef2e571c7 /qmake
parent21f2e2330f788543e3ba97eeec50885150d45397 (diff)
downloadQt-3f00eed4c329670bf10640c43467cd122347e0d2.zip
Qt-3f00eed4c329670bf10640c43467cd122347e0d2.tar.gz
Qt-3f00eed4c329670bf10640c43467cd122347e0d2.tar.bz2
Added MinGW support for adding lib prefix and extension via profile.
RevBy: Oswald Buddenhagen
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/mingw_make.cpp5
-rw-r--r--qmake/generators/win32/winmakefile.cpp22
-rw-r--r--qmake/generators/win32/winmakefile.h1
3 files changed, 19 insertions, 9 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 648776d..95795b8 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -335,12 +335,9 @@ void MingwMakefileGenerator::init()
void MingwMakefileGenerator::fixTargetExt()
{
if (project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
- project->values("TARGET_EXT").append(".a");
project->values("QMAKE_LFLAGS").append("-static");
- project->values("TARGET").first() = "lib" + project->first("TARGET");
- } else {
- Win32MakefileGenerator::fixTargetExt();
}
+ Win32MakefileGenerator::fixTargetExt();
}
void MingwMakefileGenerator::writeIncPart(QTextStream &t)
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 8530825..a2f4c7b 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -57,6 +57,14 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator()
{
}
+void Win32MakefileGenerator::init()
+{
+ if (project->isEmpty("QMAKE_EXTENSION_STATICLIB"))
+ project->values("QMAKE_EXTENSION_STATICLIB").append("lib");
+ if (project->isEmpty("QMAKE_EXTENSION_SHLIB"))
+ project->values("QMAKE_EXTENSION_SHLIB").append("lib");
+}
+
int
Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem, const QString &ext)
{
@@ -365,12 +373,16 @@ void Win32MakefileGenerator::processVars()
void Win32MakefileGenerator::fixTargetExt()
{
- if (!project->values("QMAKE_APP_FLAG").isEmpty())
+ if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
project->values("TARGET_EXT").append(".exe");
- else if (project->isActiveConfig("shared"))
- project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + ".dll");
- else
- project->values("TARGET_EXT").append(".lib");
+ } else if (project->isActiveConfig("shared")) {
+ project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "."
+ + project->first("QMAKE_EXTENSION_SHLIB"));
+ project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
+ } else {
+ project->values("TARGET_EXT").append("." + project->first("QMAKE_EXTENSION_STATICLIB"));
+ project->values("TARGET").first() = project->first("QMAKE_PREFIX_STATICLIB") + project->first("TARGET");
+ }
}
void Win32MakefileGenerator::processRcFileVar()
diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
index 5437524..0e95beb 100644
--- a/qmake/generators/win32/winmakefile.h
+++ b/qmake/generators/win32/winmakefile.h
@@ -59,6 +59,7 @@ class Win32MakefileGenerator : public MakefileGenerator
public:
Win32MakefileGenerator();
~Win32MakefileGenerator();
+ void init();
protected:
virtual QString defaultInstall(const QString &);
virtual void writeCleanParts(QTextStream &t);