SCsub 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_squish = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. if env["builtin_squish"]:
  8. thirdparty_dir = "#thirdparty/squish/"
  9. thirdparty_sources = [
  10. "alpha.cpp",
  11. "clusterfit.cpp",
  12. "colourblock.cpp",
  13. "colourfit.cpp",
  14. "colourset.cpp",
  15. "maths.cpp",
  16. "rangefit.cpp",
  17. "singlecolourfit.cpp",
  18. "squish.cpp",
  19. ]
  20. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  21. env_squish.Prepend(CPPPATH=[thirdparty_dir])
  22. env_thirdparty = env_squish.Clone()
  23. env_thirdparty.disable_warnings()
  24. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  25. env.modules_sources += thirdparty_obj
  26. # Godot source files
  27. module_obj = []
  28. env_squish.add_source_files(module_obj, "*.cpp")
  29. env.modules_sources += module_obj
  30. # Needed to force rebuilding the module files when the thirdparty library is updated.
  31. env.Depends(module_obj, thirdparty_obj)