diff --git a/modules/mono/config.py b/modules/mono/config.py index 859d77b262c9..3d087c9e27b8 100644 --- a/modules/mono/config.py +++ b/modules/mono/config.py @@ -1,8 +1,3 @@ -# Prior to .NET Core, we supported these: ["windows", "macos", "linuxbsd", "android", "web", "ios"] -# Eventually support for each them should be added back. -supported_platforms = ["windows", "macos", "linuxbsd", "android", "ios"] - - def can_build(env, platform): if env["arch"].startswith("rv"): return False @@ -14,9 +9,10 @@ def can_build(env, platform): def configure(env): - platform = env["platform"] + # Check if the platform has marked mono as supported. + supported = env.get("supported", []) - if platform not in supported_platforms: + if not "mono" in supported: raise RuntimeError("This module does not currently support building for this platform") env.add_module_version_string("mono") diff --git a/platform/android/detect.py b/platform/android/detect.py index a417ef454b0e..3da8ee0b62cc 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -68,6 +68,7 @@ def get_flags(): return [ ("arch", "arm64"), # Default for convenience. ("target", "template_debug"), + ("supported", ["mono"]), ] diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 26d81c8ed6a0..1f2e9359462c 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -49,6 +49,7 @@ def get_flags(): ("arch", "arm64"), # Default for convenience. ("target", "template_debug"), ("use_volk", False), + ("supported", ["mono"]), ] diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index 59cc6e7962b9..6737c0c4e00b 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -65,6 +65,7 @@ def get_doc_path(): def get_flags(): return [ ("arch", detect_arch()), + ("supported", ["mono"]), ] diff --git a/platform/macos/detect.py b/platform/macos/detect.py index b41d2141fbfd..fe2a0adc60cd 100644 --- a/platform/macos/detect.py +++ b/platform/macos/detect.py @@ -50,6 +50,7 @@ def get_flags(): return [ ("arch", detect_arch()), ("use_volk", False), + ("supported", ["mono"]), ] diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 801b32140a67..12b14ee99ea2 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -215,6 +215,7 @@ def get_flags(): return [ ("arch", arch), + ("supported", ["mono"]), ]