PDA

View Full Version : Visual Studio Project Name



fruzzo
28th March 2012, 16:57
Hi,
I'm building a static library that needs to have two different target names.
I would like the debug version to be called "libraryd.lib" and the release version to be called "library.lib".
I have library.pro set up as:

TEMPLATE = lib
CONFIG += qt debug_and_release staticlib

CONFIG( debug, debug|release ) {
TARGET = libraryd
} else {
TARGET = library
}

Unfortunately, when I generate projects with "qmake -t vclib", it generates libraryd.vcproj.
If I try to force it with "qmake -t vclib -o libcgt.vcproj", when I open it in
Visual Studio, the project name is still "libcgtd".
Is there a way to force it to grab the default name (i.e. library.vcproj)?

Thanks

mentalmushroom
29th March 2012, 12:26
Honestly, I don't understand the meaning of debug, release, debug_and_release options when visual studio project is generated. Visual Studio will build debug or release version depending on the one currently chosen in IDE and it doesn't care of those CONFIG options in the .pro file. If you want to specify different output name for debug and release, try the following.



TEMPLATE = lib
CONFIG += qt staticlib

Release:TARGET = library
Debug:TARGET = libraryd

fruzzo
2nd April 2012, 11:32
First of all, thanks for your suggestion...unfortunatelly this one doesn't work! :(