SCsub 875 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. Import("env_modules")
  5. env_etcpak = env_modules.Clone()
  6. # Thirdparty source files
  7. thirdparty_obj = []
  8. thirdparty_dir = "#thirdparty/etcpak/"
  9. thirdparty_sources = [
  10. "Dither.cpp",
  11. "ProcessDxtc.cpp",
  12. "ProcessRGB.cpp",
  13. "Tables.cpp",
  14. ]
  15. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  16. env_etcpak.Prepend(CPPPATH=[thirdparty_dir])
  17. env_thirdparty = env_etcpak.Clone()
  18. env_thirdparty.disable_warnings()
  19. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  20. env.modules_sources += thirdparty_obj
  21. # Godot source files
  22. module_obj = []
  23. env_etcpak.add_source_files(module_obj, "*.cpp")
  24. env.modules_sources += module_obj
  25. # Needed to force rebuilding the module files when the thirdparty library is updated.
  26. env.Depends(module_obj, thirdparty_obj)