scons recipe: made SDL checks restore env on failure.
This commit is contained in:
parent
fe75055c37
commit
27b8441003
1 changed files with 3 additions and 0 deletions
|
@ -216,6 +216,8 @@ def CheckSDL(context, sdl_lib = "SDL", require_version = None):
|
|||
except (ValueError, IndexError):
|
||||
patch_level = 0
|
||||
|
||||
backup = backup_env(context.env, ["CPPPATH", "LIBPATH", "LIBS"])
|
||||
|
||||
sdldir = context.env.get("SDLDIR", "/usr/")
|
||||
if sdl_lib == "SDL":
|
||||
if require_version:
|
||||
|
@ -255,6 +257,7 @@ def CheckSDL(context, sdl_lib = "SDL", require_version = None):
|
|||
return True
|
||||
else:
|
||||
context.Result("no")
|
||||
restore_env(env, backup)
|
||||
return False
|
||||
|
||||
def CheckOgg(context):
|
||||
|
|
Loading…
Add table
Reference in a new issue