How to get Qt building the project inside the source directory

  • I am trying to have Qt building the project inside the source directory.

    Therefore I would like to know if there is a way to define the shadow build directory path from the .pro file.
    In other words how can I influence from the .pro file the value that the qmake OUT_PWD variable will receive.

    I insist on the fact that I would like to specify this from the .pro file, not from the .pro.user file. The .pro file is checked in my version control system, the .pro.user file not.

    Now it is:

    * build-pam-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug
    * workspace
       - doc
       - src
       - dist

    And it should become

    * workspace
       - build-pam-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug
       - doc
       - src
       - dist

  • Moderators


    You can change it for every project and mode, if I am not mistaken, under the project button on the left and "build", you see the build directory.

    Or you go to "Tools"->"Options"->"Build&Run" under the "general" tab, you can set the default build directory as last option.

  • Qt Champions 2016

    What @koahnig suggest works good as i have had my build directory on ramdrive since day one :)
    However you ask about doing it in .pro file

    Note. Visual Studio has other view of the world than say mingw.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.