From 33daf4d8bc17f30c85cefe2e9dfe9b46ddb257f9 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Sat, 28 Oct 2017 16:24:44 -0300 Subject: [PATCH] Detect javascript platform using EMSCRIPTEN env as well --- platform/javascript/detect.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index cc29ad89562..a2988d9c605 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -13,7 +13,7 @@ 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(): @@ -66,7 +66,10 @@ def configure(env): ## Compiler configuration env['ENV'] = os.environ - env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT']) + if ("EMSCRIPTEN_ROOT" in os.environ): + env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT']) + elif ("EMSCRIPTEN" in os.environ): + env.PrependENVPath('PATH', os.environ['EMSCRIPTEN']) env['CC'] = 'emcc' env['CXX'] = 'em++' env['LINK'] = 'emcc'