Eos Pengwern
Eos Pengwern

Reputation: 1547

How do I stop Qt Creator placing my executable in a "debug" subdirectory?

I'm building a project in Qt Creator, and while I don't care where the intermediate .obj files go it's important that the final executable be put in (and run from) a particular directory where the many dependency DLLs etc. are to be found.

So, in Qt Creator, I select the 'Shadow Build' option and specify the path to this directory.

What I always find, however, is that instead of being put into this directory, the final executable is always placed into

the_Directory_I_Actually_Want/debug

... which is no use to me because, when I then try to run or debug the program from within Qt Creator, it won't start because the DLLs that it depends on are all in the_Directory_I_Actually_Want and not in the /debug subdirectory.

I've tried setting DESTDIR within my .pro file to the the_Directory_I_Actually_Want, and I've tried setting TARGET within my .pro file to the_Directory_I_Actually_Want/projectName, and I've tried faddling around with the various options that are part of the 'kit' configuration, and nothing seems to let me have any control over this.

Is there a way of doing this, or am I going to have to change the rest of my build system around just for Qt Creator's benefit?

Upvotes: 4

Views: 1407

Answers (1)

Phiber
Phiber

Reputation: 1103

Three years later...
Just use:

CONFIG -= \
        copy_dir_files \
        debug_and_release \
        debug_and_release_target

Upvotes: 1

Related Questions