summaryrefslogtreecommitdiff
path: root/modules/tinyexr
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-05-30 19:11:33 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-05-30 19:11:36 +0200
commit3334209a732737274a8598191267573fcb989a99 (patch)
tree43604e5f97bc11a9ba2c2e8720a49c0a1d6d0c5b /modules/tinyexr
parent28fa82c2defacca8ccad5c26022d2eeaee925f4f (diff)
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.
Diffstat (limited to 'modules/tinyexr')
-rw-r--r--modules/tinyexr/config.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/tinyexr/config.py b/modules/tinyexr/config.py
index e12bb398ce..098f1eafa9 100644
--- a/modules/tinyexr/config.py
+++ b/modules/tinyexr/config.py
@@ -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