When I build Qt applications on Ubuntu it puts the output files in the main solution folder as opposed to release/debug folders as it does on Windows.
This is problematic because sometimes the output files need to be run as part of the build process (for example to run unit tests).
I have an idea this has something to do with the qmake.conf files but I'm unsure what to do about it.
So my questions are:
The CONFIG
variable has debug_and_release
and debug_and_release_target
set on windows, but not on linux. So the following line will make sure that your build will be the same on linux and windows:
CONFIG *= debug_and_release debug_and_release_target
The documentation shortly mentions it. The file /usr/share/qt4/mkspecs/win32-g++/qmake.conf
adds it to CONFIG
.
I assume you're using qmake to do the actual building. You can edit the project files to put the output in different directories like this:
# only for unix:
unix {
# in debug mode...
CONFIG(debug, debug|release) {
DESTDIR = debug
}
else {
DESTDIR = release
}
}
Obviously in order for this to work you need to be building both debug and release executables. More information on this topic can be found here
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With