SCsub 887 B

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