Changeset 629


Ignore:
Timestamp:
Mar 4, 2010, 7:33:53 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: os2/gnumake: Added support for LIBS_PRIVATE introduced in Qt 4.6.

Location:
trunk/qmake/generators/os2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qmake/generators/os2/gnumake.cpp

    r564 r629  
    196196bool GNUMakefileGenerator::findLibraries()
    197197{
    198     QStringList &libs = project->values("QMAKE_LIBS");
     198    return findLibraries("QMAKE_LIBS") && findLibraries("QMAKE_LIBS_PRIVATE");
     199}
     200
     201bool GNUMakefileGenerator::findLibraries(const QString &where)
     202{
     203    QStringList &libs = project->values(where);
    199204
    200205    QList<QMakeLocalFileName> dirs;
     
    383388    // LIBS defined in Profile comes first for gcc
    384389    project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
     390
    385391
    386392    QStringList &configs = project->values("CONFIG");
     
    463469        QString opt = var("QMAKE_LFLAGS_LIB");
    464470        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")) {
    478483                    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                }
    480490            }
    481491        }
  • trunk/qmake/generators/os2/gnumake.h

    r564 r629  
    8282
    8383    virtual bool findLibraries();
     84
    8485    void fixTargetExt();
    8586
Note: See TracChangeset for help on using the changeset viewer.