summaryrefslogtreecommitdiff
path: root/drivers/gl_context
diff options
context:
space:
mode:
authorNinni Pipping <over999ships@gmail.com>2023-05-11 12:32:23 +0200
committerRĂ©mi Verschelde <rverschelde@gmail.com>2023-05-12 13:56:48 +0200
commitf93a4287cf833134020e5b35c4b800c2edff1b94 (patch)
treea902c82bc0039af8f8a403105682427fcab0bad1 /drivers/gl_context
parent09c5a8fe496217f408fea27a470ac8f990f3b20b (diff)
Enable shadow warnings and fix raised errors
(cherry picked from commit 71ee65dc5701a0675ae6b1879a694a28c7206a63)
Diffstat (limited to 'drivers/gl_context')
-rw-r--r--drivers/gl_context/SCsub6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub
index 2204c486c6..91240ce3e3 100644
--- a/drivers/gl_context/SCsub
+++ b/drivers/gl_context/SCsub
@@ -10,7 +10,11 @@ if env["platform"] in ["haiku", "macos", "windows", "linuxbsd"]:
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- env.Prepend(CPPPATH=[thirdparty_dir])
+ # Treat glad headers as system headers to avoid raising warnings. Not supported on MSVC.
+ if not env.msvc:
+ env.Append(CPPFLAGS=["-isystem", Dir(thirdparty_dir).path])
+ else:
+ env.Prepend(CPPPATH=[thirdparty_dir])
env.Append(CPPDEFINES=["GLAD_ENABLED"])
env.Append(CPPDEFINES=["GLES_OVER_GL"])