Important: Please read the Qt Code of Conduct -

qmake -project INCLUDEPATH recursion

  • I am upgrading from Qt 4.8 to Qt 5.7. Our source tree changes frequently, so we currently use 'qmake -project' regurly to generate our .pro file to match the source tree. Remaining configuration options are kept in a .qmake.cache file.

    In the Qt 4.8 version of qmake, the resulting .pro file from 'qmake -project' would include all sub-directories from our source tree in INCLUDEPATH. In Qt 5.7, qmake -project no longer includes those sub-directories in the INCLUDEPATH. I've tried various combinations of command line options to 'qmake -project', but none work quite right. I'd like to ensure that we don't need to hand manipulate the resulting .pro file.

    qmake -project

    • does not include subdirectories in INCLUDEPATH

    qmake -project -recursive

    • does not include subdirectories in INCLUDEPATH

    qmake -project -recursive src

    • does include subdirectories in INCLUDEPATH
    • duplicates some directories in INCLUDEPATH with absolute path (i.e. src/main, /src/main). Also duplicates some of the header and source files with absolute path in SOURCES, HEADERS.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Looks a bit like a regression. You should check the bug report system to see if there's something related to that.

  • @SGaist Thanks, after reviewing the bug list, it looks like QTBUG-48342 is what is causing my issue.

    I'm guessing that using the 'qmake -project -recursive src' would work for us if not for that issue with the extra directory separator.

    It looks like it's been outstanding for since 5.5 so I'm not going to hold my breath for a fix anytime soon. I guess I'll have to come up with a plan 'B'.

  • Lifetime Qt Champion

    Thanks for sharing your findings !

    One thing you can do is to add your own glitch to the report, that might also help pinpoint the issue.

Log in to reply