diff options
author | Michal Krol <michal@vmware.com> | 2009-09-17 12:44:24 +0200 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-09-17 12:44:24 +0200 |
commit | 2a661c383fee65bc4413541e706925fa3e9b9cf5 (patch) | |
tree | dbea0c9d65d17b81720fe2f161604dfc91eb0546 /scons/dxsdk.py | |
parent | 90daefd1c474a6e0502df5053b581987c12b8673 (diff) | |
parent | 21caa29fbd332a2ee05a58df91e1664fbbc4e61f (diff) |
Merge commit 'origin/master' into glsl-pp-rework-2
Conflicts:
src/gallium/winsys/gdi/SConscript
Diffstat (limited to 'scons/dxsdk.py')
-rw-r--r-- | scons/dxsdk.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scons/dxsdk.py b/scons/dxsdk.py index de090e4f99..920cc2f689 100644 --- a/scons/dxsdk.py +++ b/scons/dxsdk.py @@ -52,11 +52,20 @@ def generate(env): target_cpu = 'x64' else: raise SCons.Errors.InternalError, "Unsupported target machine" - include_dir = 'Include' + + include_dir = os.path.join(dxsdk_root, 'Include') + lib_dir = os.path.join(dxsdk_root, 'Lib', target_cpu) env.Append(CPPDEFINES = [('HAVE_DXSDK', '1')]) - env.Prepend(CPPPATH = [os.path.join(dxsdk_root, 'Include')]) - env.Prepend(LIBPATH = [os.path.join(dxsdk_root, 'Lib', target_cpu)]) + + gcc = 'gcc' in os.path.basename(env['CC']).split('-') + if gcc: + # Make GCC more forgiving towards Microsoft's headers + env.Prepend(CPPFLAGS = ['-isystem', include_dir]) + else: + env.Prepend(CPPPATH = [include_dir]) + + env.Prepend(LIBPATH = [lib_dir]) def exists(env): return get_dxsdk_root(env) is not None |