Skip to content

Commit e1b2645

Browse files
committed
- added support for compilation using Microsoft Visual Studio 2008
1 parent cd6cb5d commit e1b2645

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

README.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ where PLTFRM may be one of:
3535
msvc70 Microsoft Visual Studio 2002
3636
msvc71 Microsoft Visual Studio 2003
3737
msvc80 Microsoft Visual Studio 2005
38+
msvc90 Microsoft Visual Studio 2008
3839
linux-gcc Gnu C++ (linux, also reported to work for Mac OS X)
40+
41+
Notes: if you are building with Microsoft Visual Studio 2008, you need to
42+
setup the environment by running vcvars32.bat (e.g. MSVC 2008 command prompt)
43+
before running scons.
3944

40-
adding platform is fairly simple. You need to change the Sconstruct file
45+
Adding platform is fairly simple. You need to change the Sconstruct file
4146
to do so.
4247

4348
and TARGET may be:

SConstruct

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ options = Variables()
1818
options.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

2424
try:
@@ -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'
105117
elif platform == 'mingw':
106118
env.Tool( 'mingw' )
107119
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )

makerelease.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Requires Python 2.6
44
55
Example of invocation (use to test the script):
6-
python makerelease.py --platform=msvc6,msvc71,msvc80,mingw -ublep 0.6.0 0.7.0-dev
6+
python makerelease.py --platform=msvc6,msvc71,msvc80,msvc90,mingw -ublep 0.6.0 0.7.0-dev
77
88
When testing this script:
99
python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,mingw -ublep test-0.5.0 test-0.6.0-dev

0 commit comments

Comments
 (0)