PDA

View Full Version : qmake for both msvc/mingw ?



gfunk
24th November 2007, 06:17
I'm trying to make a qmake project file for a project that uses both the Mac, MSVC compiler, and the mingw compiler. However, it seems that the "win32" keyword could refer to either the MSVC or mingw compilers. Is there a scope/condition I can use to differentiate between these two? For instance, I have some compiler-specific headers:

macx {
INCLUDEPATH += mac
} else:win32 {
INCLUDEPATH += msvc
} else:????? {
INCLUDEPATH += mingw
}

bender86
24th November 2007, 11:50
You could try checking if QMAKESPEC variable contains msvc or g++.

wysota
24th November 2007, 13:06
You can make scopes based on the specs. For instance win32-g++ { xxx } should trigger on mingw and not msvc. win32-msvc*{ xxx } should trigger on all microsoft compilers.