SCsub 896 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. "DecodeRGB.cpp",
  11. "Dither.cpp",
  12. "ProcessDxtc.cpp",
  13. "ProcessRGB.cpp",
  14. "Tables.cpp",
  15. ]
  16. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  17. env_etcpak.Prepend(CPPPATH=[thirdparty_dir])
  18. env_thirdparty = env_etcpak.Clone()
  19. env_thirdparty.disable_warnings()
  20. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  21. env.modules_sources += thirdparty_obj
  22. # Godot source files
  23. module_obj = []
  24. env_etcpak.add_source_files(module_obj, "*.cpp")
  25. env.modules_sources += module_obj
  26. # Needed to force rebuilding the module files when the thirdparty library is updated.
  27. env.Depends(module_obj, thirdparty_obj)