Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4329

qmake: resolve relative paths in .pri files relative to the file being included, not the file that does the including

    XMLWordPrintable

Details

    Description

      qmake resolves relative path names in included .pri files relative to the file including the .pri file and not relative to the .pri file being included.

      Example:

      /foo/foo.pri contains:

      HEADERS += foo.h
      SOURCER += foo.cpp

      foo/bar/bar.pro contains:

      include(../foo.pri)

      Running qmake in /foo/bar/bar.pro results in warning messages about failures to find foo.h and foo.cpp.

      This can be worked around by prepending all file paths in the included files with $$PWD, or adding DEPENDPATH += $$PWD to the .pri file.

      However, it would be nice if qmake would resolve the included file paths relative to the included file.

      Note that if the pro reader behavior for qmake is changed, it should also be changed for the pro reader for other tools like lupdate.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stormols Marius Storm-Olsen
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes