summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-22 00:10:56 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-22 00:10:56 +0200
commit37ae2a290030b3f0df9f609723d9ad2bdb861a4a (patch)
tree3cc46b2fc3ae02996eb0d4242003dab1afe2738c /drivers
parent0badddaccb6e3067b62f05ff165720d5342699b9 (diff)
parent6e9bcc0f18becbed199ad48d3dec01621dc39237 (diff)
downloadredot-engine-37ae2a290030b3f0df9f609723d9ad2bdb861a4a.tar.gz
Merge pull request #95921 from akien-mga/scons-validate-opt-in-drivers
SCons: Better validation for platform-specific opt-in drivers
Diffstat (limited to 'drivers')
-rw-r--r--drivers/SCsub10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/SCsub b/drivers/SCsub
index 521d607740..44d29fb7c1 100644
--- a/drivers/SCsub
+++ b/drivers/SCsub
@@ -3,6 +3,7 @@
Import("env")
env.drivers_sources = []
+supported = env.get("supported", [])
# OS drivers
SConscript("unix/SCsub")
@@ -17,6 +18,9 @@ if env["platform"] == "windows":
if not env.msvc:
SConscript("backtrace/SCsub")
if env["xaudio2"]:
+ if "xaudio2" not in supported:
+ print("Target platform '{}' does not support the XAudio2 audio driver. Aborting.".format(env["platform"]))
+ Exit(255)
SConscript("xaudio2/SCsub")
# Midi drivers
@@ -28,12 +32,18 @@ SConscript("winmidi/SCsub")
if env["vulkan"]:
SConscript("vulkan/SCsub")
if env["d3d12"]:
+ if "d3d12" not in supported:
+ print("Target platform '{}' does not support the D3D12 rendering driver. Aborting.".format(env["platform"]))
+ Exit(255)
SConscript("d3d12/SCsub")
if env["opengl3"]:
SConscript("gl_context/SCsub")
SConscript("gles3/SCsub")
SConscript("egl/SCsub")
if env["metal"]:
+ if "metal" not in supported:
+ print("Target platform '{}' does not support the Metal rendering driver. Aborting.".format(env["platform"]))
+ Exit(255)
SConscript("metal/SCsub")
# Core dependencies