SCsub 861 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_jpg = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. # Not unbundled for now as they are not commonly available as shared library
  8. thirdparty_dir = "#thirdparty/jpeg-compressor/"
  9. thirdparty_sources = [
  10. "jpgd.cpp",
  11. "jpge.cpp",
  12. ]
  13. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  14. env_jpg.Prepend(CPPPATH=[thirdparty_dir])
  15. env_thirdparty = env_jpg.Clone()
  16. env_thirdparty.disable_warnings()
  17. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  18. env.modules_sources += thirdparty_obj
  19. # Godot source files
  20. module_obj = []
  21. env_jpg.add_source_files(module_obj, "*.cpp")
  22. env.modules_sources += module_obj
  23. # Needed to force rebuilding the module files when the thirdparty library is updated.
  24. env.Depends(module_obj, thirdparty_obj)