Add a way for qmake + configure to link dynamically to the CRT
The static CRT, libcpmt.lib, is not shipped with Visual Studio Express for Windows (unlike VS Express for Windows Desktop or Professional versions), causing configure and qmake to fail linking if this is the only VS installed. By removing -MT (which is on by default) and adding $(CFLAGS_CRT) to the compiler line, -MD can be added to the compiler flags via the environment, providing a workaround for the issue. Change-Id: I5613346d60a3a1889c121f04d53b09fbb147fc02 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
8165a9c74b
commit
e1ba711992
@ -27,7 +27,7 @@ LINKER = link
|
||||
!if "$(QMAKESPEC)" == "win32-msvc2005"
|
||||
CFLAGS_EXTRA = /Zc:wchar_t-
|
||||
!elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013"
|
||||
CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS
|
||||
CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS $(CFLAGS_CRT)
|
||||
!endif
|
||||
|
||||
CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \
|
||||
|
@ -5,7 +5,7 @@ CONFSRC = $(TOOLSRC)\configure
|
||||
PCH = configure_pch.pch
|
||||
DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DCOMMERCIAL_VERSION
|
||||
INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008"
|
||||
CXXFLAGS_BARE = -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189 $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH)
|
||||
CXXFLAGS_BARE = -nologo -Zm200 -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH)
|
||||
CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE)
|
||||
LINK = link
|
||||
LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest"
|
||||
|
Loading…
Reference in New Issue
Block a user