diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-02-20 11:07:09 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-03-11 09:26:37 +0000 |
commit | fdb7fa937a58900e3966adc765975785d0a9f0da (patch) | |
tree | 620094b14e13d679d17ab846cb8f02a6d7591e01 /mkspecs/features | |
parent | aad3c089023652844a3898fa0b7cbf1db966ef3c (diff) |
Windows: Add -static-runtime configure option
Support statically linking the MSVC/mingw runtime libraries without
manually tweaking mkspecs. This is helpful for projects like the
installer framework.
MSVC does not support mixing MT[d]/MD[d] flags in different
compilation units. The static_runtime option is therefore added
to both QT_CONFIG and CONFIG.
Change-Id: Ifd6dc9c362090457de8e2c62477d0445f9479722
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/static_runtime.prf | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mkspecs/features/static_runtime.prf b/mkspecs/features/static_runtime.prf new file mode 100644 index 0000000000..3275e6e2e2 --- /dev/null +++ b/mkspecs/features/static_runtime.prf @@ -0,0 +1,7 @@ +msvc { + # -MD becomes -MT, -MDd becomes -MTd + QMAKE_CFLAGS ~= s,^-MD(d?)$, -MT\1,g + QMAKE_CXXFLAGS ~= s,^-MD(d?)$, -MT\1,g +} else: mingw { + QMAKE_LFLAGS += -static +} |