summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-01-07 07:24:41 (GMT)
committeraxis <qt-info@nokia.com>2011-03-04 10:44:11 (GMT)
commitdbbf06e51eafe25d63cf2d0d21a1d92bde5475cc (patch)
tree4a6f82070a0f4e3d57ff93462512c18117acbb11 /qmake/generators/win32
parent7caa55505704cd907bbd19a2e79fb9e604a86675 (diff)
downloadQt-dbbf06e51eafe25d63cf2d0d21a1d92bde5475cc.zip
Qt-dbbf06e51eafe25d63cf2d0d21a1d92bde5475cc.tar.gz
Qt-dbbf06e51eafe25d63cf2d0d21a1d92bde5475cc.tar.bz2
Added MinGW support for adding lib prefix and extension via profile.
RevBy: Oswald Buddenhagen
Diffstat (limited to 'qmake/generators/win32')
-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 f1043bc..9eea98f 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 7f81b54..bfe3e09 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)
{
@@ -354,12 +362,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 fa3f292..7f7d2f3 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);