remove QMAKE_<lib>_SUFFIX support
this feature was added with a dubious commit message a decade ago, was undocumented, and there are no public traces of it being used. if i had to guess what it was meant for: to be able to consistently use -lfoo throughout a project and centrally (e.g., in .qmake.cache) choose to use foo<bar> (bar possibly being "d") instead. however, more explicit methods are being used instead, including in qt itself. Change-Id: Ic3a98dc3aec59876f26909fbf9f7aba32baa05bf Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
119cb65017
commit
b39cda2ec2
@ -398,7 +398,6 @@ UnixMakefileGenerator::findLibraries()
|
|||||||
libdirs.insert(libidx++, f);
|
libdirs.insert(libidx++, f);
|
||||||
} else if(opt.startsWith("-l")) {
|
} else if(opt.startsWith("-l")) {
|
||||||
QString lib = opt.mid(2);
|
QString lib = opt.mid(2);
|
||||||
lib += project->first(ProKey("QMAKE_" + lib.toUpper() + "_SUFFIX")).toQString();
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
ProStringList extens;
|
ProStringList extens;
|
||||||
extens << project->first("QMAKE_EXTENSION_SHLIB") << "a";
|
extens << project->first("QMAKE_EXTENSION_SHLIB") << "a";
|
||||||
@ -409,7 +408,6 @@ UnixMakefileGenerator::findLibraries()
|
|||||||
+ project->first("QMAKE_PREFIX_SHLIB")
|
+ project->first("QMAKE_PREFIX_SHLIB")
|
||||||
+ lib + '.' + (*extit));
|
+ lib + '.' + (*extit));
|
||||||
if (exists(pathToLib)) {
|
if (exists(pathToLib)) {
|
||||||
(*it) = "-l" + lib;
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -448,10 +446,9 @@ UnixMakefileGenerator::processPrlFiles()
|
|||||||
libdirs.insert(libidx++, l);
|
libdirs.insert(libidx++, l);
|
||||||
} else if(opt.startsWith("-l")) {
|
} else if(opt.startsWith("-l")) {
|
||||||
QString lib = opt.right(opt.length() - 2);
|
QString lib = opt.right(opt.length() - 2);
|
||||||
QString prl_ext = project->first(ProKey("QMAKE_" + lib.toUpper() + "_SUFFIX")).toQString();
|
|
||||||
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
|
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
|
||||||
QString prl = libdirs[dep_i].local() + '/'
|
QString prl = libdirs[dep_i].local() + '/'
|
||||||
+ project->first("QMAKE_PREFIX_SHLIB") + lib + prl_ext;
|
+ project->first("QMAKE_PREFIX_SHLIB") + lib;
|
||||||
if (processPrlFile(prl))
|
if (processPrlFile(prl))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -79,13 +79,11 @@ bool MingwMakefileGenerator::findLibraries()
|
|||||||
if ((*it).startsWith("-l")) {
|
if ((*it).startsWith("-l")) {
|
||||||
QString steam = (*it).mid(2).toQString();
|
QString steam = (*it).mid(2).toQString();
|
||||||
ProString out;
|
ProString out;
|
||||||
QString suffix = project->first(ProKey("QMAKE_" + steam.toUpper() + "_SUFFIX")).toQString();
|
|
||||||
for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) {
|
for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) {
|
||||||
QString extension;
|
QString extension;
|
||||||
int ver = findHighestVersion((*dir_it).local(), steam);
|
int ver = findHighestVersion((*dir_it).local(), steam);
|
||||||
if (ver > 0)
|
if (ver > 0)
|
||||||
extension += QString::number(ver);
|
extension += QString::number(ver);
|
||||||
extension += suffix;
|
|
||||||
if (QMakeMetaInfo::libExists((*dir_it).local() + '/' + steam)
|
if (QMakeMetaInfo::libExists((*dir_it).local() + '/' + steam)
|
||||||
|| exists((*dir_it).local() + '/' + steam + extension + ".a")
|
|| exists((*dir_it).local() + '/' + steam + extension + ".a")
|
||||||
|| exists((*dir_it).local() + '/' + steam + extension + ".dll.a")) {
|
|| exists((*dir_it).local() + '/' + steam + extension + ".dll.a")) {
|
||||||
|
@ -116,14 +116,12 @@ Win32MakefileGenerator::findLibraries()
|
|||||||
} else if(opt.startsWith("-l") || opt.startsWith("/l")) {
|
} else if(opt.startsWith("-l") || opt.startsWith("/l")) {
|
||||||
QString lib = opt.right(opt.length() - 2), out;
|
QString lib = opt.right(opt.length() - 2), out;
|
||||||
if(!lib.isEmpty()) {
|
if(!lib.isEmpty()) {
|
||||||
ProString suffix = project->first(ProKey("QMAKE_" + lib.toUpper() + "_SUFFIX"));
|
|
||||||
for(QList<QMakeLocalFileName>::Iterator it = dirs.begin();
|
for(QList<QMakeLocalFileName>::Iterator it = dirs.begin();
|
||||||
it != dirs.end(); ++it) {
|
it != dirs.end(); ++it) {
|
||||||
QString extension;
|
QString extension;
|
||||||
int ver = findHighestVersion((*it).local(), lib);
|
int ver = findHighestVersion((*it).local(), lib);
|
||||||
if(ver > 0)
|
if(ver > 0)
|
||||||
extension += QString::number(ver);
|
extension += QString::number(ver);
|
||||||
extension += suffix;
|
|
||||||
extension += ".lib";
|
extension += ".lib";
|
||||||
if (QMakeMetaInfo::libExists((*it).local() + '/' + lib)
|
if (QMakeMetaInfo::libExists((*it).local() + '/' + lib)
|
||||||
|| exists((*it).local() + '/' + lib + extension)) {
|
|| exists((*it).local() + '/' + lib + extension)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user