diff options
Diffstat (limited to 'qmake/generators/unix/unixmake.cpp')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index d7c9413290..664c81296c 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -28,7 +28,6 @@ #include "unixmake.h" #include "option.h" -#include <qregexp.h> #include <qfile.h> #include <qhash.h> #include <qdir.h> @@ -393,7 +392,7 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib) bool UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) { - QList<QMakeLocalFileName> libdirs, frameworkdirs; + QVector<QMakeLocalFileName> libdirs, frameworkdirs; int libidx = 0, fwidx = 0; for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS")) libdirs.append(QMakeLocalFileName(dlib.toQString())); @@ -419,9 +418,8 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) libdirs.insert(libidx++, f); } else if(opt.startsWith("-l")) { QString lib = opt.mid(2); - for (QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin(); - dep_it != libdirs.end(); ++dep_it) { - QString libBase = (*dep_it).local() + '/' + for (const QMakeLocalFileName &libdir : qAsConst(libdirs)) { + QString libBase = libdir.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib; if (linkPrl && processPrlFile(libBase, true)) goto found; @@ -604,7 +602,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) dst = escapeFilePath(filePrefixRoot(root, targetdir + src.section('/', -1))); if(!ret.isEmpty()) ret += "\n\t"; - ret += "-$(QINSTALL) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst; + ret += "$(QINSTALL) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst; if(!uninst.isEmpty()) uninst.append("\n\t"); uninst.append("-$(DEL_FILE) " + dst); @@ -640,16 +638,16 @@ UnixMakefileGenerator::defaultInstall(const QString &t) QString copy_cmd; if (bundle == SolidBundle) { - copy_cmd += "-$(QINSTALL) " + src_targ + ' ' + plain_targ; + copy_cmd += "$(QINSTALL) " + src_targ + ' ' + plain_targ; } else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) { - copy_cmd += "-$(QINSTALL) " + src_targ + ' ' + dst_targ; + copy_cmd += "$(QINSTALL) " + src_targ + ' ' + dst_targ; } else if (!isAux) { if (bundle == SlicedBundle) { if (!ret.isEmpty()) ret += "\n\t"; ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false); } - copy_cmd += "-$(QINSTALL_PROGRAM) " + src_targ + ' ' + dst_targ; + copy_cmd += "$(QINSTALL_PROGRAM) " + src_targ + ' ' + dst_targ; } if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && project->values(ProKey(t + ".CONFIG")).indexOf("fix_rpath") != -1) { @@ -702,7 +700,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) ret += "\n\t"; ret += mkdir_p_asstring("\"`dirname " + dst + "`\"", false) + "\n\t"; ret += "-$(DEL_FILE) " + dst + "\n\t"; // Can't overwrite symlinks to directories - ret += "-$(QINSTALL) " + escapeFilePath(src) + " " + dst; + ret += "$(QINSTALL) " + escapeFilePath(src) + " " + dst; if (!uninst.isEmpty()) uninst.append("\n\t"); uninst.append("-$(DEL_FILE) " + dst); |