Qt World Summit: Register Today!

How to turn "shadow build" off in the *.pro file?

  • Could you please advise how to turn "shadow build" off using *.pro file only (without *.user file and without using QtCreator before).

    Some details:
    There is some project file, it's placed in the source control system and several developers use it (.pro file).
    We need to place our build directories in the specific place which is a relative to the project directory.
    It's needed for copying of the output files (exe, dll etc) to the install directory after project linking.
    So I want to turn "shadow build" off. Then build directories will be placed in the project directory.
    (!) I cannot use DESTDIR param for redirection of the output files (exe, app, dll), because together with them are redirected extra files (
    .ilk, *.manifest etc)

    Thank you for any help!

  • Lifetime Qt Champion


    It's not a pro file feature, you need to turn it off when you configure your project in Qt Creator.

    Otherwise from the command line, just run qmake inside your source folder.

    Hope it helps

  • Sorry, It's so bad news... I cannot force all developers to set the specific build directories...

    Can I determine build directory? Is there any param which provides build directory path?

  • Take a look on "OUT_PWD":https://qt-project.org/doc/qt-5/qmake-variable-reference.html#out-pwd variable

    "Specifies the full path leading to the directory where qmake places the generated Makefile."

Log in to reply