SCsub 749 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. if env["platform"] in ["macos", "windows", "linuxbsd"]:
  5. # Thirdparty source files
  6. thirdparty_dir = "#thirdparty/glad/"
  7. thirdparty_sources = ["gl.c"]
  8. if not env.get("angle_libs"):
  9. thirdparty_sources += ["egl.c"]
  10. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  11. env.Prepend(CPPEXTPATH=[thirdparty_dir])
  12. env.Append(CPPDEFINES=["GLAD_ENABLED"])
  13. env.Append(CPPDEFINES=["EGL_ENABLED"])
  14. env_thirdparty = env.Clone()
  15. env_thirdparty.disable_warnings()
  16. env_thirdparty.add_source_files(env.drivers_sources, thirdparty_sources)
  17. # Godot source files
  18. env.add_source_files(env.drivers_sources, "*.cpp")