SCsub 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_navigation = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. # Recast Thirdparty source files
  8. if env["builtin_recastnavigation"]:
  9. thirdparty_dir = "#thirdparty/recastnavigation/Recast/"
  10. thirdparty_sources = [
  11. "Source/Recast.cpp",
  12. "Source/RecastAlloc.cpp",
  13. "Source/RecastArea.cpp",
  14. "Source/RecastAssert.cpp",
  15. "Source/RecastContour.cpp",
  16. "Source/RecastFilter.cpp",
  17. "Source/RecastLayers.cpp",
  18. "Source/RecastMesh.cpp",
  19. "Source/RecastMeshDetail.cpp",
  20. "Source/RecastRasterization.cpp",
  21. "Source/RecastRegion.cpp",
  22. ]
  23. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  24. env_navigation.Prepend(CPPPATH=[thirdparty_dir + "Include"])
  25. env_thirdparty = env_navigation.Clone()
  26. env_thirdparty.disable_warnings()
  27. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  28. # RVO 2D Thirdparty source files
  29. if env["builtin_rvo2_2d"]:
  30. thirdparty_dir = "#thirdparty/rvo2/rvo2_2d/"
  31. thirdparty_sources = [
  32. "Agent2d.cpp",
  33. "Obstacle2d.cpp",
  34. "KdTree2d.cpp",
  35. "RVOSimulator2d.cpp",
  36. ]
  37. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  38. env_navigation.Prepend(CPPPATH=[thirdparty_dir])
  39. env_thirdparty = env_navigation.Clone()
  40. env_thirdparty.disable_warnings()
  41. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  42. # RVO 3D Thirdparty source files
  43. if env["builtin_rvo2_3d"]:
  44. thirdparty_dir = "#thirdparty/rvo2/rvo2_3d/"
  45. thirdparty_sources = [
  46. "Agent3d.cpp",
  47. "KdTree3d.cpp",
  48. "RVOSimulator3d.cpp",
  49. ]
  50. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  51. env_navigation.Prepend(CPPPATH=[thirdparty_dir])
  52. env_thirdparty = env_navigation.Clone()
  53. env_thirdparty.disable_warnings()
  54. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  55. env.modules_sources += thirdparty_obj
  56. # Godot source files
  57. module_obj = []
  58. env_navigation.add_source_files(module_obj, "*.cpp")
  59. if env.editor_build:
  60. env_navigation.add_source_files(module_obj, "editor/*.cpp")
  61. env.modules_sources += module_obj
  62. # Needed to force rebuilding the module files when the thirdparty library is updated.
  63. env.Depends(module_obj, thirdparty_obj)