SCsub 836 B

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