Ignore:
Timestamp:
Nov 30, 2009, 12:56:45 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: Don't assume that relative paths in all OSes look like in *nix [vendor bug].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qmake/project.cpp

    r29 r362  
    14571457                if (QFile::exists(qmakespec+"/qmake.conf")) {
    14581458                    Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath();
    1459                 } else if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) {
    1460                     qmakespec = Option::mkfile::qmakespec = QFileInfo(Option::output_dir+"/"+qmakespec).absoluteFilePath();
    14611459                } else {
    1462                     bool found_mkspec = false;
    1463                     for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
    1464                         QString mkspec = (*it) + QDir::separator() + qmakespec;
    1465                         if(QFile::exists(mkspec)) {
    1466                             found_mkspec = true;
    1467                             Option::mkfile::qmakespec = qmakespec = mkspec;
    1468                             break;
     1460                    QString tmp = QDir(Option::output_dir).absoluteFilePath(qmakespec);
     1461                    if (QFile::exists(tmp+"/qmake.conf"))
     1462                        qmakespec = Option::mkfile::qmakespec = tmp;
     1463                    else {
     1464                        bool found_mkspec = false;
     1465                        foreach(const QString &root, mkspec_roots) {
     1466                            QString mkspec = QDir(root).absoluteFilePath(qmakespec);
     1467                            if(QFile::exists(mkspec)) {
     1468                                found_mkspec = true;
     1469                                Option::mkfile::qmakespec = qmakespec = mkspec;
     1470                                break;
     1471                            }
    14691472                        }
    1470                     }
    1471                     if(!found_mkspec) {
    1472                         fprintf(stderr, "Could not find mkspecs for your QMAKESPEC(%s) after trying:\n\t%s\n",
    1473                                 qmakespec.toLatin1().constData(), mkspec_roots.join("\n\t").toLatin1().constData());
    1474                         return false;
     1473                   
     1474                   
     1475                       
     1476                            ;
     1477                       
    14751478                    }
    14761479                }
     
    17751778            include_roots << qmake_getpwd();
    17761779        include_roots << Option::output_dir;
    1777         for(int root = 0; root < include_roots.size(); ++root) {
    1778             QString testName = QDir::toNativeSeparators(include_roots[root]);
    1779             if (!testName.endsWith(QString(QDir::separator())))
    1780                 testName += QDir::separator();
    1781             testName += file;
     1780        foreach(const QString &root, include_roots) {
     1781            QString testName = QDir(root).absoluteFilePath(file);
    17821782            if(QFile::exists(testName)) {
    17831783                file = testName;
Note: See TracChangeset for help on using the changeset viewer.