Changeset 119
- Timestamp:
- Aug 17, 2009, 8:58:38 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mkspecs/features/os2/default_pre.prf
r104 r119 54 54 !build_pass: return(true) 55 55 56 # this is necessary to store LIBS as QMAKE_PRL_LIBS in the generated .prl57 CONFIG += explicitlib58 59 56 # define _VERSION_OVERRIDE statements if needed 60 57 for(a, 1) { … … 79 76 80 77 CONFIG($$SPLIT_CONFIG):CONFIG($$scope) { 81 # add the other parts to LIBS of this part 78 # add the other parts to LIBS of this part 82 79 for(b, 1) { 83 80 !equals(b, $${a}) { 84 81 equals(b, "."):b = 85 82 eval(LIBS += -l$${TARGET}$${b}) 83 86 84 } 87 85 } 88 86 !isEmpty(LIBS):export(LIBS) 89 QMAKE_LIBDIR += $(DESTDIR) 87 !isEmpty(PRL_EXPORT_LIBS):export(PRL_EXPORT_LIBS) 88 89 QMAKE_LIBDIR *= $(DESTDIR) 90 90 export(QMAKE_LIBDIR) 91 91 -
trunk/qmake/generators/makefile.cpp
r52 r119 963 963 else if(!project->isEmpty("VERSION")) 964 964 t << "QMAKE_PRL_VERSION = " << project->first("VERSION") << endl; 965 if(project->isActiveConfig("staticlib") || project->isActiveConfig("explicitlib")) { 966 QStringList libs; 967 if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) 968 libs = project->values("QMAKE_INTERNAL_PRL_LIBS"); 969 else 970 libs << "QMAKE_LIBS"; //obvious one 965 if(project->isActiveConfig("staticlib") || project->isActiveConfig("explicitlib") || 966 !project->isEmpty("PRL_EXPORT_LIBS")) { 971 967 t << "QMAKE_PRL_LIBS = "; 972 for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it) 973 t << project->values((*it)).join(" ") << " "; 968 if (!project->isEmpty("PRL_EXPORT_LIBS")) { 969 // PRL_EXPORT_LIBS overrides anything else 970 t << project->values("PRL_EXPORT_LIBS").join(" "); 971 } else { 972 QStringList libs; 973 if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) 974 libs = project->values("QMAKE_INTERNAL_PRL_LIBS"); 975 else 976 libs << "QMAKE_LIBS"; //obvious one 977 for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it) 978 t << project->values((*it)).join(" ") << " "; 979 } 974 980 t << endl; 975 981 } -
trunk/qmake/generators/os2/gnumake.cpp
r103 r119 110 110 if (project->isActiveConfig("link_prl")) { 111 111 QMakeMetaInfo libinfo; 112 if (libinfo.readLib(bd + Option::dir_sep + dllStem)) { 112 QString libfile = QMakeMetaInfo::findLib(bd + Option::dir_sep + dllStem); 113 if (project->values("QMAKE_PRL_INTERNAL_FILES").contains(libfile)) { 114 // already processed, return emtpy string to discard this lib 115 return QString(""); 116 } 117 if (libinfo.readLib(libfile)) { 118 project->values("QMAKE_PRL_INTERNAL_FILES") += libfile; 113 119 QString target = libinfo.first("QMAKE_PRL_TARGET"); 120 121 122 123 114 124 if (target.isEmpty()) 115 target = stem;125 target = tem; 116 126 if (!versionOverride.isEmpty()) 117 127 target += versionOverride; … … 120 130 121 131 const QStringList &in = libinfo.values("QMAKE_PRL_LIBS"); 122 QStringList &out = project->values("QMAKE_ INTERNAL_PRL_LIBS");132 QStringList &out = project->values("QMAKE_PRL_LIBS"); 123 133 for (QStringList::ConstIterator it = in.begin(); it != in.end(); ++it) { 124 134 if (!out.contains(*it)) … … 165 175 } 166 176 167 for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { 168 if((*it).startsWith("-L")) { 169 dirs.append(QMakeLocalFileName((*it).mid(2))); 170 } else { 171 QString stem = *it, out; 172 173 if (stem.startsWith("-l")) 174 stem = stem.mid(2); 175 176 QString suffix; 177 if (!project->isEmpty("QMAKE_" + stem.toUpper() + "_SUFFIX")) 178 suffix = project->first("QMAKE_" + stem.toUpper() + "_SUFFIX"); 179 for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { 180 QString best = findBestVersion((*dir_it).local(), stem, 181 QString("%1.lib").arg(suffix)); 182 if (!best.isEmpty()) { 183 out = best.prepend("-l"); 184 break; 177 QStringList::Iterator it = l.begin(); 178 179 do { 180 project->values("QMAKE_PRL_LIBS").clear(); 181 bool erase = false; 182 for (; it != l.end(); erase ? (erase = false, it = l.erase(it)) : ++it) { 183 if((*it).startsWith("-L")) { 184 dirs.append(QMakeLocalFileName((*it).mid(2))); 185 } else { 186 QString stem = *it, out; 187 188 if (stem.startsWith("-l")) 189 stem = stem.mid(2); 190 191 QString suffix; 192 if (!project->isEmpty("QMAKE_" + stem.toUpper() + "_SUFFIX")) 193 suffix = project->first("QMAKE_" + stem.toUpper() + "_SUFFIX"); 194 for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { 195 QString best = findBestVersion((*dir_it).local(), stem, 196 QString("%1.lib").arg(suffix)); 197 if (!best.isNull()) { 198 if (best.isEmpty()) { 199 // we are asked to discard this lib, do it 200 erase = true; 201 break; 202 } 203 out = best.prepend("-l"); 204 break; 205 } 185 206 } 207 208 209 186 210 } 187 if (!out.isEmpty()) // We assume if it never finds it that its correct 188 if (!project->values("QMAKE_LIBS").contains(out)) 189 (*it) = out; 190 } 191 } 192 193 QStringList l2 = project->values("QMAKE_INTERNAL_PRL_LIBS"); 194 for (QStringList::ConstIterator it = l2.begin(); it != l2.end(); ++it) { 195 if (!l.contains(*it)) 196 l.append((*it)); 197 } 211 } 212 213 // add the libraries from PRL and process them normally 214 QStringList l2 = project->values("QMAKE_PRL_LIBS"); 215 int oldSize = l.size(); 216 for (QStringList::ConstIterator it2 = l2.begin(); it2 != l2.end(); ++it2) { 217 if (!l.contains(*it2)) 218 l.append(*it2); 219 } 220 it = l.begin() + oldSize; 221 222 } while(it != l.end()); 198 223 199 224 return true;
Note:
See TracChangeset
for help on using the changeset viewer.