PDA

View Full Version : QtCreator project multiple targets



thru
14th March 2011, 15:47
I think this one is very elemental but I can not catch my misunderstood.
I just want to have a project with different targets, debug and release to develop under QtCreator. If I have this pro file


QT += core gui

TARGET = WTest
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

win32{

debug {
OBJECTS_DIR=T:/Tmp/ObjsD
}
release {
OBJECTS_DIR=T:/Tmp/ObjsR
}
}

And I select the Debug target, it is, souldn't it write the objects to the t:/Tmp/ObjsD directory? (it writes to ObjsR actually)

stampede
17th March 2011, 07:27
Try this way:


win32{
build_pass:CONFIG(debug, debug|release){
OBJECTS_DIR=T:/Tmp/ObjsD
} else {
OBJECTS_DIR=T:/Tmp/ObjsR
}
}