SCsub 845 B

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