Detect javascript platform using EMSCRIPTEN env as well
This commit is contained in:
parent
c93a3c1bd9
commit
33daf4d8bc
1 changed files with 5 additions and 2 deletions
|
@ -13,7 +13,7 @@ def get_name():
|
||||||
|
|
||||||
def can_build():
|
def can_build():
|
||||||
|
|
||||||
return ("EMSCRIPTEN_ROOT" in os.environ)
|
return ("EMSCRIPTEN_ROOT" in os.environ or "EMSCRIPTEN" in os.environ)
|
||||||
|
|
||||||
|
|
||||||
def get_opts():
|
def get_opts():
|
||||||
|
@ -66,7 +66,10 @@ def configure(env):
|
||||||
## Compiler configuration
|
## Compiler configuration
|
||||||
|
|
||||||
env['ENV'] = os.environ
|
env['ENV'] = os.environ
|
||||||
|
if ("EMSCRIPTEN_ROOT" in os.environ):
|
||||||
env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT'])
|
env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT'])
|
||||||
|
elif ("EMSCRIPTEN" in os.environ):
|
||||||
|
env.PrependENVPath('PATH', os.environ['EMSCRIPTEN'])
|
||||||
env['CC'] = 'emcc'
|
env['CC'] = 'emcc'
|
||||||
env['CXX'] = 'em++'
|
env['CXX'] = 'em++'
|
||||||
env['LINK'] = 'emcc'
|
env['LINK'] = 'emcc'
|
||||||
|
|
Loading…
Reference in a new issue