| 1 |
|
| 2 |
from misc.utility.scons_hints import * |
| 3 |
|
| 4 |
Import("env") |
| 5 |
|
| 6 |
if env["platform"] in ["macos", "windows", "linuxbsd"]: |
| 7 |
|
| 8 |
thirdparty_dir = "#thirdparty/glad/" |
| 9 |
thirdparty_sources = ["gl.c"] |
| 10 |
|
| 11 |
if not env.get("angle_libs"): |
| 12 |
thirdparty_sources += ["egl.c"] |
| 13 |
|
| 14 |
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] |
| 15 |
|
| 16 |
env.Prepend(CPPPATH=[thirdparty_dir]) |
| 17 |
|
| 18 |
env.Append(CPPDEFINES=["GLAD_ENABLED"]) |
| 19 |
env.Append(CPPDEFINES=["EGL_ENABLED"]) |
| 20 |
|
| 21 |
env_thirdparty = env.Clone() |
| 22 |
env_thirdparty.disable_warnings() |
| 23 |
env_thirdparty.add_source_files(env.drivers_sources, thirdparty_sources) |
| 24 |
|
| 25 |
|
| 26 |
env.add_source_files(env.drivers_sources, "*.cpp") |