diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2014-12-30 23:57:40 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2014-12-31 00:26:41 +0300 |
commit | 4d55c33e4747fb373e74ba50d70daaa9404e4d1c (patch) | |
tree | 490f2654c5bea06e111421ac0d83f156582ac751 /compiler.pri | |
parent | a0247d71fa6f612e5dafafe039cef116b21487ce (diff) |
compiler.pri: use explicit subsystem versioning for Windows builds.
Diffstat (limited to 'compiler.pri')
-rw-r--r-- | compiler.pri | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/compiler.pri b/compiler.pri index 789562b29..c5dcec643 100644 --- a/compiler.pri +++ b/compiler.pri @@ -104,11 +104,30 @@ win32 { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings + # Explicitly set the subsystem versions to + # 5.01 (XP) for x86 and 6.00 (Vista) for x64. + # + # Qt expands the @QMAKE_SUBSYSTEM_SUFFIX@ via + # qt_config.prf, which doesn't seem to trigger + # for us. So we'll just try our luck. QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE - QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01 - + QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE@QMAKE_SUBSYSTEM_SUFFIX@ QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS - QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01 + QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS@QMAKE_SUBSYSTEM_SUFFIX@ + !isEmpty(QMAKE_LFLAGS_WINDOWS) { + error("QMAKE_LFLAGS_WINDOWS is not empty. Please adjust the pri file.") + } + !isEmpty(QMAKE_LFLAGS_CONSOLE) { + error("QMAKE_LFLAGS_CONSOLE is not empty. Please adjust the pri file.") + } + equals(QMAKE_TARGET.arch, x86) { + QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01 + QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01 + } + equals(QMAKE_TARGET.arch, x86_64) { + QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,6.00 + QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,6.00 + } CONFIG(analyze) { QMAKE_CFLAGS_DEBUG *= /analyze |