Permalink
Browse files

- added support for compilation using Microsoft Visual Studio 2008

git-svn-id: https://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/jsoncpp@143 1f120ed1-78a5-a849-adca-83f0a9e25bb6
  • Loading branch information...
1 parent b117336 commit 27eace06b42e1adc61c6b6c675b8973fbc81db48 blep committed Mar 13, 2010
Showing with 20 additions and 3 deletions.
  1. +6 −1 README.txt
  2. +13 −1 SConstruct
  3. +1 −1 makerelease.py
View
@@ -35,9 +35,14 @@ where PLTFRM may be one of:
msvc70 Microsoft Visual Studio 2002
msvc71 Microsoft Visual Studio 2003
msvc80 Microsoft Visual Studio 2005
+ msvc90 Microsoft Visual Studio 2008
linux-gcc Gnu C++ (linux, also reported to work for Mac OS X)
+
+Notes: if you are building with Microsoft Visual Studio 2008, you need to
+setup the environment by running vcvars32.bat (e.g. MSVC 2008 command prompt)
+before running scons.
-adding platform is fairly simple. You need to change the Sconstruct file
+Adding platform is fairly simple. You need to change the Sconstruct file
to do so.
and TARGET may be:
View
@@ -18,7 +18,7 @@ options = Variables()
options.Add( EnumVariable('platform',
'Platform (compiler/stl) used to build the project',
'msvc71',
- allowed_values='suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 linux-gcc'.split(),
+ allowed_values='suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 msvc90 linux-gcc'.split(),
ignorecase=2) )
try:
@@ -102,6 +102,18 @@ elif platform == 'msvc80':
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
env.Tool( tool )
env['CXXFLAGS']='-GR -EHsc /nologo /MT'
+elif platform == 'msvc90':
+ env['MSVS_VERSION']='9.0'
+ # Scons 1.2 fails to detect the correct location of the platform SDK.
+ # So we propagate those from the environment. This requires that the
+ # user run vcvars32.bat before compiling.
+ if 'INCLUDE' in os.environ:
+ env['ENV']['INCLUDE'] = os.environ['INCLUDE']
+ if 'LIB' in os.environ:
+ env['ENV']['LIB'] = os.environ['LIB']
+ for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
+ env.Tool( tool )
+ env['CXXFLAGS']='-GR -EHsc /nologo /MT'
elif platform == 'mingw':
env.Tool( 'mingw' )
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
View
@@ -3,7 +3,7 @@
Requires Python 2.6
Example of invocation (use to test the script):
-python makerelease.py --platform=msvc6,msvc71,msvc80,mingw -ublep 0.6.0 0.7.0-dev
+python makerelease.py --platform=msvc6,msvc71,msvc80,msvc90,mingw -ublep 0.6.0 0.7.0-dev
When testing this script:
python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,mingw -ublep test-0.5.0 test-0.6.0-dev

0 comments on commit 27eace0

Please sign in to comment.