SCsub 1.0 KB

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