diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-06-02 13:16:42 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-06-03 11:00:10 +0200 |
commit | 7c743122172e7f32f184081f743346ad6ac5b332 (patch) | |
tree | 4f1b527a24b213ea5be40471b8e6f8db1d97a462 /SConstruct | |
parent | 030a26206ff70b1050c885270afce89b0430af70 (diff) |
SCons: Validate dependencies for linked multimedia modules
This is still a bit hacky and eventually we should rework the way we handle
optional dependencies (especially with regard to builtin/system libs), but
it's a simple first step.
Fixes #39219.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct index 27e6c5f2d3..b424363dc8 100644 --- a/SConstruct +++ b/SConstruct @@ -86,6 +86,7 @@ env_base.__class__.add_library = methods.add_library env_base.__class__.add_program = methods.add_program env_base.__class__.CommandNoCache = methods.CommandNoCache env_base.__class__.disable_warnings = methods.disable_warnings +env_base.__class__.module_check_dependencies = methods.module_check_dependencies env_base["x86_libtheora_opt_gcc"] = False env_base["x86_libtheora_opt_vc"] = False @@ -607,14 +608,12 @@ if selected_platform in platform_list: env.Append(CPPDEFINES=["MINIZIP_ENABLED"]) editor_module_list = ["regex"] - for x in editor_module_list: - if not env["module_" + x + "_enabled"]: - if env["tools"]: - print( - "Build option 'module_" + x + "_enabled=no' cannot be used with 'tools=yes' (editor), " - "only with 'tools=no' (export template)." - ) - Exit(255) + if env["tools"] and not env.module_check_dependencies("tools", editor_module_list): + print( + "Build option 'module_" + x + "_enabled=no' cannot be used with 'tools=yes' (editor), " + "only with 'tools=no' (export template)." + ) + Exit(255) if not env["verbose"]: methods.no_verbose(sys, env) |