1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Detect javascript platform using EMSCRIPTEN env as well

(cherry picked from commit 33daf4d8bc)
This commit is contained in:
Marcelo Fernandez
2017-10-28 16:24:44 -03:00
committed by Rémi Verschelde
parent 42f00d002e
commit 20b821780c

View File

@@ -12,7 +12,8 @@ def get_name():
def can_build():
return ("EMSCRIPTEN_ROOT" in os.environ)
return ("EMSCRIPTEN_ROOT" in os.environ or "EMSCRIPTEN" in os.environ)
def get_opts():
@@ -39,7 +40,11 @@ def configure(env):
env.Append(CPPPATH=['#platform/javascript'])
env['ENV'] = os.environ
if ("EMSCRIPTEN_ROOT" in os.environ):
em_path = os.environ["EMSCRIPTEN_ROOT"]
elif ("EMSCRIPTEN" in os.environ):
em_path = os.environ["EMSCRIPTEN"]
env['ENV']['PATH'] = em_path + ":" + env['ENV']['PATH']