[Qt-interest] qmake: debug_and_release uses release target name for debug

John McClurkin jwm at nei.nih.gov
Sat Aug 22 17:44:28 CEST 2009


Alexander Poddey wrote:
> Hi all,
> 
> following the manual, I Use
> 
>  CONFIG += qt debug_and_release
> 
>  CONFIG(debug, debug|release) {
>      TARGET = debug_binary
>  } else {
>      TARGET = release_binary
>  }
> 
> make debug operates in debug dir but uses release_binary as TARGET:
> 
> g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.2/lib -o release_binary 
> debug/main.o
> 
> whay that?
> 
> another question:
> using 
> CONFIG += qt
> CONFIG += debug_and_release
> seems to miss the qt part and therefore produces compile errors such as
> error: QCoreApplication: No such file or directory
> 
> shouldn't both variants be equivalent?
> 
> 
> 
> thx 
> alex

Here is how I do what you seem to want to do.
> TEMPLATE = app
> CONFIG += warn_off debug_and_release build_all
> TARGET = Dex
> RESOURCES = ../Dex.qrc
> DEPENDPATH += ../
> INCLUDEPATH += ../ ../../libRex ../../libTempo ../../libMat/ ../../libStics ../../libTig/lib
> DEFINES += _LINUX
> MOC_DIR = moc_dir
> CONFIG(release, debug|release) {
> 	TARGET = Dex
> 	OBJECTS_DIR = release
> 	DESTDIR = release
> 	LIBS += -L../../libRex/Linux/release -lRex -L../../libTempo/Linux/release -lTempo -L../../libStics/Linux/release -lStics -L../../libTig/lib/Linux/release -lTig -lm
> }
> CONFIG(debug, debug|release) {
> 	TARGET = Dexd
> 	OBJECTS_DIR = debug
> 	DESTDIR = debug
> 	LIBS += -L../../libRex/Linux/debug -lRexd -L../../libTempo/Linux/debug -lTempod -L../../libStics/Linux/debug -lSticsd -L../../libTig/lib/Linux/debug -lTigd -lm
> }
snip



More information about the Qt-interest-old mailing list