SCsub 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. Import("env_modules")
  5. env_vhacd = env_modules.Clone()
  6. # Thirdparty source files
  7. thirdparty_obj = []
  8. thirdparty_dir = "#thirdparty/vhacd/"
  9. thirdparty_sources = [
  10. "src/vhacdManifoldMesh.cpp",
  11. "src/FloatMath.cpp",
  12. "src/vhacdMesh.cpp",
  13. "src/vhacdICHull.cpp",
  14. "src/vhacdVolume.cpp",
  15. "src/VHACD-ASYNC.cpp",
  16. "src/btAlignedAllocator.cpp",
  17. "src/vhacdRaycastMesh.cpp",
  18. "src/VHACD.cpp",
  19. "src/btConvexHullComputer.cpp",
  20. ]
  21. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  22. env_vhacd.Prepend(CPPPATH=[thirdparty_dir + "inc"])
  23. env_thirdparty = env_vhacd.Clone()
  24. env_thirdparty.disable_warnings()
  25. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  26. env.modules_sources += thirdparty_obj
  27. # Godot source files
  28. module_obj = []
  29. env_vhacd.add_source_files(module_obj, "*.cpp")
  30. env.modules_sources += module_obj
  31. # Needed to force rebuilding the module files when the thirdparty library is updated.
  32. env.Depends(module_obj, thirdparty_obj)