SCsub 928 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_pvr = 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/pvrtccompressor/"
  9. thirdparty_sources = [
  10. "BitScale.cpp",
  11. "MortonTable.cpp",
  12. "PvrTcDecoder.cpp",
  13. "PvrTcEncoder.cpp",
  14. "PvrTcPacket.cpp",
  15. ]
  16. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  17. env_pvr.Prepend(CPPPATH=[thirdparty_dir])
  18. env_thirdparty = env_pvr.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_pvr.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)