diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-06-01 20:04:22 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-10-01 16:19:36 +0000 |
commit | 5df87614e388640a4717ffcfeb478cc57575dd4e (patch) | |
tree | 61c2c7ecc2ccfedc726a58ea6448b252abf36709 /qmake | |
parent | cbbeed519b8bd98de71bd93c51c682f9d11158bd (diff) |
remove link_highest_lib_version misfeature
in retrospect, we were too conservative in 925fd32a2d8f making the
"feature" optional - it simply makes no sense to have qmake
automatically find the highest major (!) version of a library based on
a loosely defined platform-specific convention (not standard, unlike
ELF's .so versioning) with side effects.
Change-Id: Iba92df433b199a9fbff88358f6e0f6835f2e813d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 24 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.h | 2 |
3 files changed, 4 insertions, 24 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 88a4494ec4..70b2e8325b 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -82,7 +82,7 @@ bool MingwMakefileGenerator::findLibraries() QString suffix = project->first(ProKey("QMAKE_" + steam.toUpper() + "_SUFFIX")).toQString(); for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { QString extension; - int ver = findHighestVersion((*dir_it).local(), steam, "dll.a|a"); + int ver = findHighestVersion((*dir_it).local(), steam); if (ver > 0) extension += QString::number(ver); extension += suffix; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 2059cc7585..2d070e89e2 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -50,7 +50,7 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator() } int -Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem, const QString &ext) +Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem) { QString bd = Option::normalizePath(d); if(!exists(bd)) @@ -69,30 +69,10 @@ Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem return vover.first().toInt(); int biggest=-1; - if (project->isActiveConfig("link_highest_lib_version")) { - static QHash<QString, QStringList> dirEntryListCache; - QStringList entries = dirEntryListCache.value(bd); - if (entries.isEmpty()) { - QDir dir(bd); - entries = dir.entryList(); - dirEntryListCache.insert(bd, entries); - } - - QRegExp regx(QString("((lib)?%1([0-9]*)).(%2|prl)$").arg(stem).arg(ext), Qt::CaseInsensitive); - for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { - if(regx.exactMatch((*it))) { - if (!regx.cap(3).isEmpty()) { - bool ok = true; - int num = regx.cap(3).toInt(&ok); - biggest = qMax(biggest, (!ok ? -1 : num)); - } - } - } - } if(libInfoRead && !libinfo.values("QMAKE_PRL_CONFIG").contains("staticlib") && !libinfo.isEmpty("QMAKE_PRL_VERSION")) - biggest = qMax(biggest, libinfo.first("QMAKE_PRL_VERSION").toQString().replace(".", "").toInt()); + biggest = libinfo.first("QMAKE_PRL_VERSION").toQString().replace(".", "").toInt(); return biggest; } diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h index d09ec4259d..25b555ec86 100644 --- a/qmake/generators/win32/winmakefile.h +++ b/qmake/generators/win32/winmakefile.h @@ -57,7 +57,7 @@ protected: virtual void writeRcFilePart(QTextStream &t); - int findHighestVersion(const QString &dir, const QString &stem, const QString &ext = QLatin1String("lib")); + int findHighestVersion(const QString &dir, const QString &stem); virtual bool findLibraries(); virtual ProString fixLibFlag(const ProString &lib); |