From 9a5ee124347d3f75be2e957142143338dd96abe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 29 Jun 2009 12:56:47 +0100 Subject: [PATCH] scons: Don't raise an exception when DXSDK is not found. Unfortunately scons does not check if a tool exists before it invokes its generate function. --- scons/dxsdk.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scons/dxsdk.py b/scons/dxsdk.py index a369e1da10c..de090e4f991 100644 --- a/scons/dxsdk.py +++ b/scons/dxsdk.py @@ -40,10 +40,11 @@ def get_dxsdk_root(env): except KeyError: return None -def get_dxsdk_paths(env): +def generate(env): dxsdk_root = get_dxsdk_root(env) if dxsdk_root is None: - raise SCons.Errors.InternalError, "DirectX SDK not found" + # DirectX SDK not found + return if env['machine'] in ('generic', 'x86'): target_cpu = 'x86' @@ -57,9 +58,6 @@ def get_dxsdk_paths(env): env.Prepend(CPPPATH = [os.path.join(dxsdk_root, 'Include')]) env.Prepend(LIBPATH = [os.path.join(dxsdk_root, 'Lib', target_cpu)]) -def generate(env): - get_dxsdk_paths(env) - def exists(env): return get_dxsdk_root(env) is not None -- 2.30.2