I am using Qt Creator and want to link against different libs in debug mode.

This is my .pro file:
Qt Code:
  1. # -------------------------------------------------
  2. # Project created by QtCreator 2009-02-06T01:28:15
  3. # -------------------------------------------------
  4. TARGET = uglyviewer
  5. TEMPLATE = app
  6. UI_DIR = tmp
  7. MOC_DIR = tmp
  8. INCLUDEPATH += C:\\OgreSDK\\include
  9. SOURCES += src/uglyviewer.cpp \
  10. src/main.cpp \
  11. src/ogrewidget.cpp \
  12. src/ogremanager.cpp \
  13. src/inputmanager.cpp
  14. HEADERS += src/uglyviewer.h \
  15. src/ogrewidget.h \
  16. src/singleton.h \
  17. src/ogremanager.h \
  18. src/inputmanager.h
  19. FORMS += ui/uglyviewer.ui
  20. RESOURCES += res/resource.qrc
  21. RC_FILE = res/app.rc
  22. debug {
  23. OBJECTS_DIR = tmp/debug/
  24. RCC_DIR = tmp/debug/
  25. LIBS = -L%OGRE_HOME%\bin\debug -lOIS_d -lOgreMain_d
  26. }
  27. release {
  28. OBJECTS_DIR = tmp/release/
  29. RCC_DIR = tmp/release/
  30. LIBS = -L%OGRE_HOME%\bin\release -lOIS -lOgreMain
  31. }
To copy to clipboard, switch view to plain text mode 

The problem is that release overwrites debug because the Qt Creator always adds an debug_and_release to the CONFIG and therefore both debug and release are always definded.