Changeset 629
- Timestamp:
- Mar 4, 2010, 7:33:53 PM (15 years ago)
- Location:
- trunk/qmake/generators/os2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qmake/generators/os2/gnumake.cpp
r564 r629 196 196 bool GNUMakefileGenerator::findLibraries() 197 197 { 198 QStringList &libs = project->values("QMAKE_LIBS"); 198 return findLibraries("QMAKE_LIBS") && findLibraries("QMAKE_LIBS_PRIVATE"); 199 } 200 201 bool GNUMakefileGenerator::findLibraries(const QString &where) 202 { 203 QStringList &libs = project->values(where); 199 204 200 205 QList<QMakeLocalFileName> dirs; … … 383 388 // LIBS defined in Profile comes first for gcc 384 389 project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); 390 385 391 386 392 QStringList &configs = project->values("CONFIG"); … … 463 469 QString opt = var("QMAKE_LFLAGS_LIB"); 464 470 QString optL = var("QMAKE_LFLAGS_LIBDIR"); 465 QStringList libs = project->values("QMAKE_LIBS"); 466 for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it) { 467 QString lib = escapeFilePath(*it); 468 /* lib may be prefixed with -l which is commonly used in e.g. PRF 469 * (feature) files on all platforms; remove it before prepending 470 * the compiler-specific option. There is even more weird case 471 * when LIBS contains library paths prefixed with -L; we detect 472 * this as well and replace it with the proper option. */ 473 if (lib.startsWith("-L")) { 474 lib = lib.mid(2); 475 t << " " << optL << lib; 476 } else { 477 if (lib.startsWith("-l")) 471 QStringList libVars; 472 libVars << "QMAKE_LIBS" << "QMAKE_LIBS_PRIVATE"; 473 foreach(const QString &libVar, libVars) { 474 QStringList libs = project->values(libVar); 475 for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it) { 476 QString lib = escapeFilePath(*it); 477 /* lib may be prefixed with -l which is commonly used in e.g. PRF 478 * (feature) files on all platforms; remove it before prepending 479 * the compiler-specific option. There is even more weird case 480 * when LIBS contains library paths prefixed with -L; we detect 481 * this as well and replace it with the proper option. */ 482 if (lib.startsWith("-L")) { 478 483 lib = lib.mid(2); 479 t << " " << opt << lib; 484 t << " " << optL << lib; 485 } else { 486 if (lib.startsWith("-l")) 487 lib = lib.mid(2); 488 t << " " << opt << lib; 489 } 480 490 } 481 491 } -
trunk/qmake/generators/os2/gnumake.h
r564 r629 82 82 83 83 virtual bool findLibraries(); 84 84 85 void fixTargetExt(); 85 86
Note:
See TracChangeset
for help on using the changeset viewer.