I would like to put binaries of release and debug build in different folders beside source code. in .pro file:
CONFIG(debug){
DESTDIR = ./debug
OBJECTS_DIR = debug/.obj
MOC_DIR = debug/.moc
RCC_DIR = debug/.rcc
UI_DIR = debug/.ui
}
CONFIG(release){
DESTDIR = ./release
OBJECTS_DIR = release/.obj
MOC_DIR = release/.moc
RCC_DIR = release/.rcc
UI_DIR = release/.ui
}
For release builds everything is good. I have a ./release directory in root of project. But for debug build, qmake didn't create a debug directory, it's name is release
(again!):
qmake CONFIG+=debug CONFIG+=local
// generates release and put everything in that directory
// but I want debug directory !
Update:
Replacing order of debug and release, makes debug directory. Only last config is seen by qmake...
If you really have to do in-source builds and have separate output directories, I think you need to change your conditionals per documentation to
CONFIG(debug, debug|release){
DESTDIR = ./debug
OBJECTS_DIR = debug/.obj
MOC_DIR = debug/.moc
RCC_DIR = debug/.rcc
UI_DIR = debug/.ui
}
CONFIG(release, debug|release){
DESTDIR = ./release
OBJECTS_DIR = release/.obj
MOC_DIR = release/.moc
RCC_DIR = release/.rcc
UI_DIR = release/.ui
}
Don't ask me why, though. IMHO QMake is an abomination that should be avoided at all cost...
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