For my Qt project, I have the normal debug and release build configurations using the standard version of qmake, however I also need to build static (Windows 64-bit) versions of my project using a different, static build of qmake. I am currently doing the static build using the command line and a separete .pro file, however I would prefer to do this with the same .pro file I use for the non-static versions, and from within Qt creator if possible.
I have already created a kit for the static version of qmake, my problem now is that I can't get qmake to link my project against the proper libraries (I have separate library versions for debug, release, and static builds). My pro file looks like this:
CONFIG(debug, debug|release|static ) {
#debug build
LIBS += ../third-party-library/debug/library.lib
}
CONFIG( release, debug|release|static ) {
CONFIG(static, debug|release|static) {
#static release build
LIBS += ../third-party-library/static/library.lib
} else {
#non-static release build
LIBS += ../third-party-library/release/library.lib
}
}
In the project settings for the release build, I'm calling qmake like this:
qmake.exe MyProject.pro -spec win32-msvc "CONFIG+=static"
My question is how do I add an additional build configuration besides the usual debug/release ones, and how do I specify specific libraries for it?