qt5base-lts/mkspecs/features/static_runtime.prf
Kai Koehne fdb7fa937a 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>
2015-03-11 09:26:37 +00:00

8 lines
178 B
Plaintext

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
}