summaryrefslogtreecommitdiffstats
path: root/qmake/generators/unix/unixmake.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-17 10:12:54 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-17 10:12:54 (GMT)
commitf0c615651fabb3e15469ab1eee3b4765dc1274d3 (patch)
tree7e7052dfcac781a99b3696efe2ee0b1df12652e9 /qmake/generators/unix/unixmake.cpp
parented08d67fea713e550da0fd0542672cc4443806e2 (diff)
parentab5fbde3235a6d613a8dfb58deb79c67b70d9f55 (diff)
downloadQt-f0c615651fabb3e15469ab1eee3b4765dc1274d3.zip
Qt-f0c615651fabb3e15469ab1eee3b4765dc1274d3.tar.gz
Qt-f0c615651fabb3e15469ab1eee3b4765dc1274d3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: (190 commits) Fixed Symbian applications with DESTDIR set. Removed a warning about generated rss files. Revert "Temporarily disable problematic dll." Fixed "Cannot install protected application" message on Symbian. Worked around a crash in the elf2e32 postlinker tool. Worked around case differences in Symbian^3 and Gnupoc. Enabled compilation of plugins again. Fixed a building bug where the DLL entry point was undefined. Moved UID2 processing from cpp code to profiles. Added rpp and rsg files to ignore filter. Moved two profiles to the correct directory. Fix build break caused by undefined symbol SetDialogPreference Temporarily disable problematic dll. Use the same concept for per-lib tweaks as armcc Consistently use the * in configure Symbian doesn't have large file support currently, just turn it off Remove largefile config test Make sure that we have all compile flags available always Enabled dependencies for .dso and .lib libraries only. Switched to using DEF_FILE, which is the official variable. ...
Diffstat (limited to 'qmake/generators/unix/unixmake.cpp')
-rw-r--r--qmake/generators/unix/unixmake.cpp41
1 files changed, 25 insertions, 16 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index f85d707..db5b957 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -65,6 +65,10 @@ UnixMakefileGenerator::init()
}
}
+ if (project->isEmpty("QMAKE_PREFIX_SHLIB"))
+ // Prevent crash when using the empty variable.
+ project->values("QMAKE_PREFIX_SHLIB").append("");
+
if(!project->isEmpty("QMAKE_FAILED_REQUIREMENTS")) /* no point */
return;
@@ -449,7 +453,9 @@ UnixMakefileGenerator::findLibraries()
if(!libdirs.contains(f))
libdirs.append(f);
} else if(opt.startsWith("-l")) {
- if (project->isActiveConfig("rvct_linker")) {
+ if (!project->isEmpty("QMAKE_RVCT_LINKSTYLE")) {
+ (*it) = opt.mid(2);
+ } else if (project->isActiveConfig("rvct_linker")) {
(*it) = "lib" + opt.mid(2) + ".so";
} else {
stub = opt.mid(2);
@@ -489,26 +495,29 @@ UnixMakefileGenerator::findLibraries()
QStringList extens;
if(!extn.isNull())
extens << extn;
+ else if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB"))
+ // In Symbian you link to the stub .lib file, but run with the .dll file.
+ extens << "lib";
else
extens << project->values("QMAKE_EXTENSION_SHLIB").first() << "a";
for(QStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) {
if(dir.isNull()) {
- QString lib_stub;
for(QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin(); dep_it != libdirs.end(); ++dep_it) {
- if(exists((*dep_it).local() + Option::dir_sep + "lib" + stub +
- "." + (*extit))) {
- lib_stub = stub;
+ QString pathToLib = ((*dep_it).local() + Option::dir_sep
+ + project->values("QMAKE_PREFIX_SHLIB").first()
+ + stub + "." + (*extit));
+ if(exists(pathToLib)) {
+ if (!project->isEmpty("QMAKE_RVCT_LINKSTYLE"))
+ (*it) = pathToLib;
+ else
+ (*it) = "-l" + stub;
+ found = true;
break;
}
}
- if(!lib_stub.isNull()) {
- (*it) = "-l" + lib_stub;
- found = true;
- break;
- }
} else {
- if(exists("lib" + stub + "." + (*extit))) {
- (*it) = "lib" + stub + "." + (*extit);
+ if(exists(project->values("QMAKE_PREFIX_SHLIB").first() + stub + "." + (*extit))) {
+ (*it) = project->values("QMAKE_PREFIX_SHLIB").first() + stub + "." + (*extit);
found = true;
break;
}
@@ -516,8 +525,8 @@ UnixMakefileGenerator::findLibraries()
}
if(!found && project->isActiveConfig("compile_libtool")) {
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
- if(exists(libdirs[dep_i].local() + Option::dir_sep + "lib" + stub + Option::libtool_ext)) {
- (*it) = libdirs[dep_i].real() + Option::dir_sep + "lib" + stub + Option::libtool_ext;
+ if(exists(libdirs[dep_i].local() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + stub + Option::libtool_ext)) {
+ (*it) = libdirs[dep_i].real() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + stub + Option::libtool_ext;
found = true;
break;
}
@@ -557,7 +566,7 @@ UnixMakefileGenerator::processPrlFiles()
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
const QMakeLocalFileName &lfn = libdirs[dep_i];
if(!project->isActiveConfig("compile_libtool")) { //give them the .libs..
- QString la = lfn.local() + Option::dir_sep + "lib" + lib + Option::libtool_ext;
+ QString la = lfn.local() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + lib + Option::libtool_ext;
if(exists(la) && QFile::exists(lfn.local() + Option::dir_sep + ".libs")) {
QString dot_libs = lfn.real() + Option::dir_sep + ".libs";
l.append("-L" + dot_libs);
@@ -565,7 +574,7 @@ UnixMakefileGenerator::processPrlFiles()
}
}
- QString prl = lfn.local() + Option::dir_sep + "lib" + lib;
+ QString prl = lfn.local() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + lib;
if(!project->isEmpty("QMAKE_" + lib.toUpper() + "_SUFFIX"))
prl += project->first("QMAKE_" + lib.toUpper() + "_SUFFIX");
if(processPrlFile(prl)) {