2
0

SCsub 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_recast"]:
  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 Thirdparty source files
  29. if env["builtin_rvo2"]:
  30. thirdparty_dir = "#thirdparty/rvo2/"
  31. thirdparty_sources = [
  32. "Agent.cpp",
  33. "KdTree.cpp",
  34. ]
  35. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  36. env_navigation.Prepend(CPPPATH=[thirdparty_dir])
  37. env_thirdparty = env_navigation.Clone()
  38. env_thirdparty.disable_warnings()
  39. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  40. env.modules_sources += thirdparty_obj
  41. # Godot source files
  42. module_obj = []
  43. env_navigation.add_source_files(module_obj, "*.cpp")
  44. env.modules_sources += module_obj
  45. # Needed to force rebuilding the module files when the thirdparty library is updated.
  46. env.Depends(module_obj, thirdparty_obj)