summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-27 15:20:05 (GMT)
committeraxis <qt-info@nokia.com>2009-12-11 10:36:28 (GMT)
commit1e6d71f5560f651041a574d899979a770c1974c1 (patch)
treea9e9b7829a399d2a9153f26a3500bf7b017456b2 /qmake
parent2409649053279db13f829c168dccbb6da98c866b (diff)
downloadQt-1e6d71f5560f651041a574d899979a770c1974c1.zip
Qt-1e6d71f5560f651041a574d899979a770c1974c1.tar.gz
Qt-1e6d71f5560f651041a574d899979a770c1974c1.tar.bz2
Added support for QT_*_STATICLIB variables in qmake.
This is so that Symbian can have custom prefixes and extensions.
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/unix/unixmake2.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 6a23708..5bfee16 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -334,7 +334,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "SUBLIBS = ";
QStringList &l = project->values("SUBLIBS");
for(QStringList::Iterator it = l.begin(); it != l.end(); ++it)
- t << libdir << "lib" << (*it) << ".a ";
+ t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
+ << project->first("QMAKE_EXTENSION_STATICLIB") << " ";
t << endl << endl;
}
if(project->isActiveConfig("depend_prl") && !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) {
@@ -873,7 +874,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
libdir = project->first("SUBLIBS_DIR");
QStringList &l = project->values("SUBLIBS");
for(it = l.begin(); it != l.end(); ++it)
- t << libdir << "lib" << (*it) << ".a" << ":\n\t"
+ t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
+ << project->first("QMAKE_EXTENSION_STATICLIB") << ":\n\t"
<< var(QString("MAKELIB") + (*it)) << endl << endl;
}
@@ -1006,12 +1008,13 @@ void UnixMakefileGenerator::init2()
if (!project->values("QMAKE_CYGWIN_EXE").isEmpty())
project->values("TARGET_EXT").append(".exe");
} else if (project->isActiveConfig("staticlib")) {
- project->values("TARGET").first().prepend("lib");
- project->values("TARGET").first() += ".a";
+ project->values("TARGET").first().prepend(project->first("QMAKE_PREFIX_STATICLIB"));
+ project->values("TARGET").first() += "." + project->first("QMAKE_EXTENSION_STATICLIB");
if(project->values("QMAKE_AR_CMD").isEmpty())
project->values("QMAKE_AR_CMD").append("$(AR) $(TARGET) $(OBJECTS)");
} else {
- project->values("TARGETA").append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
+ project->values("TARGETA").append(project->first("DESTDIR") + project->first("QMAKE_PREFIX_STATICLIB")
+ + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_STATICLIB"));
if(project->isActiveConfig("compile_libtool"))
project->values("TARGET_la") = QStringList(project->first("DESTDIR") + "lib" + project->first("TARGET") + Option::libtool_ext);
@@ -1059,7 +1062,8 @@ void UnixMakefileGenerator::init2()
project->first("VER_MAJ"));
project->values("TARGET") = project->values("TARGET_x");
} else if (!project->isEmpty("QMAKE_AIX_SHLIB")) {
- project->values("TARGET_").append("lib" + project->first("TARGET") + ".a");
+ project->values("TARGET_").append(project->first("QMAKE_PREFIX_STATICLIB") + project->first("TARGET")
+ + "." + project->first("QMAKE_EXTENSION_STATICLIB"));
if(project->isActiveConfig("lib_version_first")) {
project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
project->first("VER_MAJ") + "." +