SCsub 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_etc = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. # Not unbundled so far since not widespread as shared library
  8. thirdparty_dir = "#thirdparty/etc2comp/"
  9. thirdparty_sources = [
  10. "EtcBlock4x4.cpp",
  11. "EtcBlock4x4Encoding.cpp",
  12. "EtcBlock4x4Encoding_ETC1.cpp",
  13. "EtcBlock4x4Encoding_R11.cpp",
  14. "EtcBlock4x4Encoding_RG11.cpp",
  15. "EtcBlock4x4Encoding_RGB8A1.cpp",
  16. "EtcBlock4x4Encoding_RGB8.cpp",
  17. "EtcBlock4x4Encoding_RGBA8.cpp",
  18. "Etc.cpp",
  19. "EtcDifferentialTrys.cpp",
  20. "EtcFilter.cpp",
  21. "EtcImage.cpp",
  22. "EtcIndividualTrys.cpp",
  23. "EtcMath.cpp",
  24. "EtcSortedBlockList.cpp",
  25. ]
  26. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  27. env_etc.Prepend(CPPPATH=[thirdparty_dir])
  28. env_thirdparty = env_etc.Clone()
  29. env_thirdparty.disable_warnings()
  30. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  31. env.modules_sources += thirdparty_obj
  32. # Godot source files
  33. module_obj = []
  34. env_etc.add_source_files(module_obj, "*.cpp")
  35. env.modules_sources += module_obj
  36. # Needed to force rebuilding the module files when the thirdparty library is updated.
  37. env.Depends(module_obj, thirdparty_obj)