SCsub 932 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. # Only kept to build the thirdparty library used by the theora and webm
  5. # modules.
  6. env_ogg = env_modules.Clone()
  7. # Thirdparty source files
  8. thirdparty_obj = []
  9. if env["builtin_libogg"]:
  10. thirdparty_dir = "#thirdparty/libogg/"
  11. thirdparty_sources = [
  12. "bitwise.c",
  13. "framing.c",
  14. ]
  15. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  16. env_ogg.Prepend(CPPPATH=[thirdparty_dir])
  17. env_thirdparty = env_ogg.Clone()
  18. env_thirdparty.disable_warnings()
  19. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  20. env.modules_sources += thirdparty_obj
  21. # Godot source files
  22. module_obj = []
  23. env_ogg.add_source_files(module_obj, "*.cpp")
  24. env.modules_sources += module_obj
  25. # Needed to force rebuilding the module files when the thirdparty library is updated.
  26. env.Depends(module_obj, thirdparty_obj)