Debian Codegraph @

modules/navigation_3d/SCsub

raw symbols SCIP
1 #!/usr/bin/env python
2 from misc.utility.scons_hints import *
3
4 Import("env")
5 Import("env_modules")
6
7 env_navigation_3d = env_modules.Clone()
8
9 # Thirdparty source files
10
11 thirdparty_obj = []
12 navigation_2d_enabled = "navigation_2d" in env.module_list
13
14 # Recast Thirdparty source files
15 if env["builtin_recastnavigation"]:
16 thirdparty_dir = "#thirdparty/recastnavigation/Recast/"
17 thirdparty_sources = [
18 "Source/Recast.cpp",
19 "Source/RecastAlloc.cpp",
20 "Source/RecastArea.cpp",
21 "Source/RecastAssert.cpp",
22 "Source/RecastContour.cpp",
23 "Source/RecastFilter.cpp",
24 "Source/RecastLayers.cpp",
25 "Source/RecastMesh.cpp",
26 "Source/RecastMeshDetail.cpp",
27 "Source/RecastRasterization.cpp",
28 "Source/RecastRegion.cpp",
29 ]
30 thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
31
32 env_navigation_3d.Prepend(CPPPATH=[thirdparty_dir + "Include"])
33
34 env_thirdparty = env_navigation_3d.Clone()
35 env_thirdparty.disable_warnings()
36 env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
37
38 # RVO 2D Thirdparty source files
39 if env["builtin_rvo2_2d"]:
40 thirdparty_dir = "#thirdparty/rvo2/rvo2_2d/"
41 thirdparty_sources = [
42 "Agent2d.cpp",
43 "Obstacle2d.cpp",
44 "KdTree2d.cpp",
45 "RVOSimulator2d.cpp",
46 ]
47 thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
48
49 env_navigation_3d.Prepend(CPPPATH=[thirdparty_dir])
50
51 # Don't build rvo_2d if 2D navigation is enabled.
52 if not navigation_2d_enabled:
53 env_thirdparty = env_navigation_3d.Clone()
54 env_thirdparty.disable_warnings()
55 env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
56
57 # RVO 3D Thirdparty source files
58 if env["builtin_rvo2_3d"]:
59 thirdparty_dir = "#thirdparty/rvo2/rvo2_3d/"
60 thirdparty_sources = [
61 "Agent3d.cpp",
62 "KdTree3d.cpp",
63 "RVOSimulator3d.cpp",
64 ]
65 thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
66
67 env_navigation_3d.Prepend(CPPPATH=[thirdparty_dir])
68
69 env_thirdparty = env_navigation_3d.Clone()
70 env_thirdparty.disable_warnings()
71 env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
72
73
74 env.modules_sources += thirdparty_obj
75
76 # Godot source files
77
78 module_obj = []
79
80 env_navigation_3d.add_source_files(module_obj, "*.cpp")
81 env_navigation_3d.add_source_files(module_obj, "3d/*.cpp")
82 if env.editor_build:
83 env_navigation_3d.add_source_files(module_obj, "editor/*.cpp")
84 env.modules_sources += module_obj
85
86 # Needed to force rebuilding the module files when the thirdparty library is updated.
87 env.Depends(module_obj, thirdparty_obj)