Commit 9a5ee124 authored by Jose Fonseca's avatar Jose Fonseca

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.
parent bb8f3090
......@@ -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
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):
def exists(env):
return get_dxsdk_root(env) is not None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment