@@ -18,7 +18,7 @@ options = Variables()
1818options .Add ( EnumVariable ('platform' ,
1919 'Platform (compiler/stl) used to build the project' ,
2020 'msvc71' ,
21- allowed_values = 'suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 linux-gcc' .split (),
21+ allowed_values = 'suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 msvc90 linux-gcc' .split (),
2222 ignorecase = 2 ) )
2323
2424try :
@@ -102,6 +102,18 @@ elif platform == 'msvc80':
102102 for tool in ['msvc' , 'msvs' , 'mslink' , 'masm' , 'mslib' ]:
103103 env .Tool ( tool )
104104 env ['CXXFLAGS' ]= '-GR -EHsc /nologo /MT'
105+ elif platform == 'msvc90' :
106+ env ['MSVS_VERSION' ]= '9.0'
107+ # Scons 1.2 fails to detect the correct location of the platform SDK.
108+ # So we propagate those from the environment. This requires that the
109+ # user run vcvars32.bat before compiling.
110+ if 'INCLUDE' in os .environ :
111+ env ['ENV' ]['INCLUDE' ] = os .environ ['INCLUDE' ]
112+ if 'LIB' in os .environ :
113+ env ['ENV' ]['LIB' ] = os .environ ['LIB' ]
114+ for tool in ['msvc' , 'msvs' , 'mslink' , 'masm' , 'mslib' ]:
115+ env .Tool ( tool )
116+ env ['CXXFLAGS' ]= '-GR -EHsc /nologo /MT'
105117elif platform == 'mingw' :
106118 env .Tool ( 'mingw' )
107119 env .Append ( CPPDEFINES = [ "WIN32" , "NDEBUG" , "_MT" ] )
0 commit comments