SCons: Pass env to modules can_build method

This allows to disable modules based on the environment,
in particular `env[tools]` which tells us if we are
building the editor or not.
This commit is contained in:
Rémi Verschelde
2018-05-30 19:11:33 +02:00
parent 28fa82c2de
commit 3334209a73
33 changed files with 53 additions and 61 deletions

View File

@@ -1,9 +1,5 @@
def can_build(platform):
return True
def can_build(env, platform):
return env['tools']
def configure(env):
# Tools only, disabled for non-tools
# TODO: Find a cleaner way to achieve that
if not env['tools']:
env['module_tinyexr_enabled'] = False
env.disabled_modules.append("tinyexr")
pass