From 7c743122172e7f32f184081f743346ad6ac5b332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 2 Jun 2020 13:16:42 +0200 Subject: 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. --- modules/opus/config.py | 2 +- modules/theora/config.py | 2 +- modules/vorbis/config.py | 2 +- modules/webm/config.py | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/opus/config.py b/modules/opus/config.py index d22f9454ed..9ff7b2dece 100644 --- a/modules/opus/config.py +++ b/modules/opus/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return env.module_check_dependencies("opus", ["ogg"]) def configure(env): diff --git a/modules/theora/config.py b/modules/theora/config.py index 413acce2df..b063ed51f9 100644 --- a/modules/theora/config.py +++ b/modules/theora/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return env.module_check_dependencies("theora", ["ogg", "vorbis"]) def configure(env): diff --git a/modules/vorbis/config.py b/modules/vorbis/config.py index d22f9454ed..8a384e3066 100644 --- a/modules/vorbis/config.py +++ b/modules/vorbis/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return env.module_check_dependencies("vorbis", ["ogg"]) def configure(env): diff --git a/modules/webm/config.py b/modules/webm/config.py index 93b49d177a..99f8ace114 100644 --- a/modules/webm/config.py +++ b/modules/webm/config.py @@ -1,5 +1,8 @@ def can_build(env, platform): - return platform not in ["iphone"] + if platform in ["iphone"]: + return False + + return env.module_check_dependencies("webm", ["ogg", "opus", "vorbis"]) def configure(env): -- cgit v1.2.3