mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-06-07 01:04:55 +02:00
- fixed build issue on AIX. Build both shared and static library is now only activated on Linux. Building static library on other platforms.
This commit is contained in:
parent
4e19f180b8
commit
bf95d0f619
10
SConstruct
10
SConstruct
@ -148,32 +148,28 @@ elif platform == 'msvc6':
|
|||||||
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
||||||
env.Tool( tool )
|
env.Tool( tool )
|
||||||
env['CXXFLAGS']='-GR -GX /nologo /MT'
|
env['CXXFLAGS']='-GR -GX /nologo /MT'
|
||||||
env['SHARED_LIB_ENABLED'] = False
|
|
||||||
elif platform == 'msvc70':
|
elif platform == 'msvc70':
|
||||||
env['MSVS_VERSION']='7.0'
|
env['MSVS_VERSION']='7.0'
|
||||||
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
||||||
env.Tool( tool )
|
env.Tool( tool )
|
||||||
env['CXXFLAGS']='-GR -GX /nologo /MT'
|
env['CXXFLAGS']='-GR -GX /nologo /MT'
|
||||||
env['SHARED_LIB_ENABLED'] = False
|
|
||||||
elif platform == 'msvc71':
|
elif platform == 'msvc71':
|
||||||
env['MSVS_VERSION']='7.1'
|
env['MSVS_VERSION']='7.1'
|
||||||
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
||||||
env.Tool( tool )
|
env.Tool( tool )
|
||||||
env['CXXFLAGS']='-GR -GX /nologo /MT'
|
env['CXXFLAGS']='-GR -GX /nologo /MT'
|
||||||
env['SHARED_LIB_ENABLED'] = False
|
|
||||||
elif platform == 'msvc80':
|
elif platform == 'msvc80':
|
||||||
env['MSVS_VERSION']='8.0'
|
env['MSVS_VERSION']='8.0'
|
||||||
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
|
||||||
env.Tool( tool )
|
env.Tool( tool )
|
||||||
env['CXXFLAGS']='-GR -EHsc /nologo /MT'
|
env['CXXFLAGS']='-GR -EHsc /nologo /MT'
|
||||||
env['SHARED_LIB_ENABLED'] = False
|
|
||||||
elif platform == 'mingw':
|
elif platform == 'mingw':
|
||||||
env.Tool( 'mingw' )
|
env.Tool( 'mingw' )
|
||||||
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
|
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
|
||||||
env['SHARED_LIB_ENABLED'] = False
|
|
||||||
elif platform.startswith('linux-gcc'):
|
elif platform.startswith('linux-gcc'):
|
||||||
env.Tool( 'default' )
|
env.Tool( 'default' )
|
||||||
env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" )
|
env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" )
|
||||||
|
env['SHARED_LIB_ENABLED'] = True
|
||||||
else:
|
else:
|
||||||
print "UNSUPPORTED PLATFORM."
|
print "UNSUPPORTED PLATFORM."
|
||||||
env.Exit(1)
|
env.Exit(1)
|
||||||
@ -191,7 +187,9 @@ if short_platform.startswith('msvc'):
|
|||||||
short_platform = short_platform[2:]
|
short_platform = short_platform[2:]
|
||||||
# Notes: on Windows you need to rebuild the source for each variant
|
# Notes: on Windows you need to rebuild the source for each variant
|
||||||
# Build script does not support that yet so we only build static libraries.
|
# Build script does not support that yet so we only build static libraries.
|
||||||
env['SHARED_LIB_ENABLED'] = env.get('SHARED_LIB_ENABLED', True)
|
# This also fails on AIX because both dynamic and static library ends with
|
||||||
|
# extension .a.
|
||||||
|
env['SHARED_LIB_ENABLED'] = env.get('SHARED_LIB_ENABLED', False)
|
||||||
env['LIB_PLATFORM'] = short_platform
|
env['LIB_PLATFORM'] = short_platform
|
||||||
env['LIB_LINK_TYPE'] = 'lib' # static
|
env['LIB_LINK_TYPE'] = 'lib' # static
|
||||||
env['LIB_CRUNTIME'] = 'mt'
|
env['LIB_CRUNTIME'] = 'mt'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user