diff options
-rw-r--r-- | SConstruct | 6 | ||||
-rwxr-xr-x | scons/gallium.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct index 0e10818ba1..ef71ab69c3 100644 --- a/SConstruct +++ b/SConstruct @@ -80,9 +80,6 @@ env.Append(CPPPATH = [ '#/src/gallium/winsys', ]) -if env['msvc']: - env.Append(CPPPATH = ['#include/c99']) - # for debugging #print env.Dump() @@ -115,9 +112,6 @@ if env['crosscompile'] and not env['embedded']: host_env['hostonly'] = True assert host_env['crosscompile'] == False - if host_env['msvc']: - host_env.Append(CPPPATH = ['#include/c99']) - target_env = env env = host_env Export('env') diff --git a/scons/gallium.py b/scons/gallium.py index ca317b0cfd..5109ebffee 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -433,6 +433,12 @@ def generate(env): # See also: # - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx # - cl /? + if 'MSVC_VERSION' not in env or distutils.version.LooseVersion(env['MSVC_VERSION']) < distutils.version.LooseVersion('12.0'): + # Use bundled stdbool.h and stdint.h headers for older MSVC + # versions. stdint.h was introduced in MSVC 2010, but stdbool.h + # was only introduced in MSVC 2013. + top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) + env.Append(CPPPATH = [os.path.join(top_dir, 'include/c99')]) if env['build'] == 'debug': ccflags += [ '/Od', # disable optimizations |