summaryrefslogtreecommitdiffstats
path: root/platform/macos/detect.py
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-11-12 14:49:49 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-09-21 14:21:00 +0300
commit1887a9df19ea689bfb69f55454f0598bd09ab95f (patch)
treeb303d94caa33c5ee0f27544057f8cea1ced36a5e /platform/macos/detect.py
parent59139df16e7a10c3b9176f697d23b557af46601e (diff)
downloadredot-engine-1887a9df19ea689bfb69f55454f0598bd09ab95f.tar.gz
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
Diffstat (limited to 'platform/macos/detect.py')
-rw-r--r--platform/macos/detect.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/macos/detect.py b/platform/macos/detect.py
index 6abe121407..c97cd19211 100644
--- a/platform/macos/detect.py
+++ b/platform/macos/detect.py
@@ -32,6 +32,7 @@ def get_opts():
BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN)", False),
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN)", False),
BoolVariable("use_coverage", "Use instrumentation codes in the binary (e.g. for code coverage)", False),
+ ("angle_libs", "Path to the ANGLE static libraries", ""),
]
@@ -255,7 +256,13 @@ def configure(env: "Environment"):
if env["opengl3"]:
env.Append(CPPDEFINES=["GLES3_ENABLED"])
- env.Append(LINKFLAGS=["-framework", "OpenGL"])
+ if env["angle_libs"] != "":
+ env.AppendUnique(CPPDEFINES=["EGL_STATIC"])
+ env.Append(LINKFLAGS=["-L" + env["angle_libs"]])
+ env.Append(LINKFLAGS=["-lANGLE.macos." + env["arch"]])
+ env.Append(LINKFLAGS=["-lEGL.macos." + env["arch"]])
+ env.Append(LINKFLAGS=["-lGLES.macos." + env["arch"]])
+ env.Prepend(CPPPATH=["#thirdparty/angle/include"])
env.Append(LINKFLAGS=["-rpath", "@executable_path/../Frameworks", "-rpath", "@executable_path"])