From 3334209a732737274a8598191267573fcb989a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 30 May 2018 19:11:33 +0200 Subject: 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. --- modules/tinyexr/config.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'modules/tinyexr') 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 -- cgit v1.2.3