summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SConstruct6
-rw-r--r--drivers/SCsub10
-rw-r--r--modules/mono/config.py6
-rw-r--r--platform/ios/detect.py2
-rw-r--r--platform/macos/detect.py2
-rw-r--r--platform/windows/detect.py2
6 files changed, 20 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index ca160c1762..94574aacb2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -218,11 +218,11 @@ opts.Add(BoolVariable("deprecated", "Enable compatibility code for deprecated an
opts.Add(EnumVariable("precision", "Set the floating-point precision level", "single", ("single", "double")))
opts.Add(BoolVariable("minizip", "Enable ZIP archive support using minizip", True))
opts.Add(BoolVariable("brotli", "Enable Brotli for decompresson and WOFF2 fonts support", True))
-opts.Add(BoolVariable("xaudio2", "Enable the XAudio2 audio driver", False))
+opts.Add(BoolVariable("xaudio2", "Enable the XAudio2 audio driver on supported platforms", False))
opts.Add(BoolVariable("vulkan", "Enable the vulkan rendering driver", True))
opts.Add(BoolVariable("opengl3", "Enable the OpenGL/GLES3 rendering driver", True))
-opts.Add(BoolVariable("d3d12", "Enable the Direct3D 12 rendering driver", False))
-opts.Add(BoolVariable("metal", "Enable the Metal rendering driver (Apple arm64 only)", False))
+opts.Add(BoolVariable("d3d12", "Enable the Direct3D 12 rendering driver on supported platforms", False))
+opts.Add(BoolVariable("metal", "Enable the Metal rendering driver on supported platforms (Apple arm64 only)", False))
opts.Add(BoolVariable("openxr", "Enable the OpenXR driver", True))
opts.Add(BoolVariable("use_volk", "Use the volk library to load the Vulkan loader dynamically", True))
opts.Add(BoolVariable("disable_exceptions", "Force disabling exception handling code", True))
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
diff --git a/modules/mono/config.py b/modules/mono/config.py
index 5ebdb83b36..0573fc662a 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -11,9 +11,11 @@ def can_build(env, platform):
def configure(env):
# Check if the platform has marked mono as supported.
supported = env.get("supported", [])
-
if "mono" not in supported:
- raise RuntimeError("This module does not currently support building for this platform")
+ import sys
+
+ print("The 'mono' module does not currently support building for this platform. Aborting.")
+ sys.exit(255)
env.add_module_version_string("mono")
diff --git a/platform/ios/detect.py b/platform/ios/detect.py
index ecd1f3d32d..989a7f21f3 100644
--- a/platform/ios/detect.py
+++ b/platform/ios/detect.py
@@ -52,7 +52,7 @@ def get_flags():
"target": "template_debug",
"use_volk": False,
"metal": True,
- "supported": ["mono"],
+ "supported": ["metal", "mono"],
"builtin_pcre2_with_jit": False,
}
diff --git a/platform/macos/detect.py b/platform/macos/detect.py
index bfd18bea99..e35423d41f 100644
--- a/platform/macos/detect.py
+++ b/platform/macos/detect.py
@@ -57,7 +57,7 @@ def get_flags():
"arch": detect_arch(),
"use_volk": False,
"metal": True,
- "supported": ["mono"],
+ "supported": ["metal", "mono"],
}
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index b4830c5908..11dd4548f1 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -247,7 +247,7 @@ def get_flags():
return {
"arch": arch,
- "supported": ["mono"],
+ "supported": ["d3d12", "mono", "xaudio2"],
}