SCsub 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. Import("env_modules")
  5. env_meshoptimizer = env_modules.Clone()
  6. # Thirdparty source files
  7. thirdparty_obj = []
  8. thirdparty_dir = "#thirdparty/meshoptimizer/"
  9. thirdparty_sources = [
  10. "allocator.cpp",
  11. "clusterizer.cpp",
  12. "indexcodec.cpp",
  13. "indexgenerator.cpp",
  14. "overdrawanalyzer.cpp",
  15. "overdrawoptimizer.cpp",
  16. "simplifier.cpp",
  17. "spatialorder.cpp",
  18. "stripifier.cpp",
  19. "vcacheanalyzer.cpp",
  20. "vcacheoptimizer.cpp",
  21. "vertexcodec.cpp",
  22. "vertexfilter.cpp",
  23. "vfetchanalyzer.cpp",
  24. "vfetchoptimizer.cpp",
  25. ]
  26. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  27. env_thirdparty = env_meshoptimizer.Clone()
  28. env_thirdparty.disable_warnings()
  29. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  30. env.modules_sources += thirdparty_obj
  31. # Godot source files
  32. module_obj = []
  33. env_meshoptimizer.add_source_files(module_obj, "*.cpp")
  34. env.modules_sources += module_obj
  35. # Needed to force rebuilding the module files when the thirdparty library is updated.
  36. env.Depends(module_obj, thirdparty_obj)