-
Notifications
You must be signed in to change notification settings - Fork 4
/
SCsub
101 lines (86 loc) · 2.74 KB
/
SCsub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/env python
Import('env')
Import('env_modules')
env_godot_box2d = env_modules.Clone()
# Thirdparty source files
thirdparty_dir = "thirdparty/box2d/"
box2d_src = [
"collision/b2_broad_phase.cpp",
"collision/b2_chain_shape.cpp",
"collision/b2_circle_shape.cpp",
"collision/b2_collide_circle.cpp",
"collision/b2_collide_edge.cpp",
"collision/b2_collide_polygon.cpp",
"collision/b2_collision.cpp",
"collision/b2_distance.cpp",
"collision/b2_dynamic_tree.cpp",
"collision/b2_edge_shape.cpp",
"collision/b2_polygon_shape.cpp",
"collision/b2_time_of_impact.cpp",
"common/b2_block_allocator.cpp",
"common/b2_draw.cpp",
"common/b2_math.cpp",
"common/b2_settings.cpp",
"common/b2_stack_allocator.cpp",
"common/b2_timer.cpp",
"dynamics/b2_body.cpp",
"dynamics/b2_chain_circle_contact.cpp",
"dynamics/b2_chain_polygon_contact.cpp",
"dynamics/b2_circle_contact.cpp",
"dynamics/b2_contact.cpp",
"dynamics/b2_contact_manager.cpp",
"dynamics/b2_contact_solver.cpp",
"dynamics/b2_distance_joint.cpp",
"dynamics/b2_edge_circle_contact.cpp",
"dynamics/b2_edge_polygon_contact.cpp",
"dynamics/b2_fixture.cpp",
"dynamics/b2_friction_joint.cpp",
"dynamics/b2_gear_joint.cpp",
"dynamics/b2_island.cpp",
"dynamics/b2_joint.cpp",
"dynamics/b2_motor_joint.cpp",
"dynamics/b2_mouse_joint.cpp",
"dynamics/b2_polygon_circle_contact.cpp",
"dynamics/b2_polygon_contact.cpp",
"dynamics/b2_prismatic_joint.cpp",
"dynamics/b2_pulley_joint.cpp",
"dynamics/b2_revolute_joint.cpp",
"dynamics/b2_weld_joint.cpp",
"dynamics/b2_wheel_joint.cpp",
"dynamics/b2_world.cpp",
"dynamics/b2_world_callbacks.cpp",
"rope/b2_rope.cpp",
]
box2d_include = [
"include/",
"src/",
# "dynamics/b2_chain_circle_contact.h",
# "dynamics/b2_chain_polygon_contact.h",
# "dynamics/b2_circle_contact.h",
# "dynamics/b2_contact_solver.h",
# "dynamics/b2_edge_circle_contact.h",
# "dynamics/b2_edge_polygon_contact.h",
# "dynamics/b2_island.h",
# "dynamics/b2_polygon_circle_contact.h",
# "dynamics/b2_polygon_contact.h",
]
thirdparty_sources = [thirdparty_dir + "src/" + file for file in box2d_src]
thirdparty_include = [thirdparty_dir + file for file in box2d_include]
thirdparty_include.append(["b2include/"])
# add Box2D includes to our module
env_godot_box2d.Prepend(CPPPATH=thirdparty_include)
env_godot_box2d.Append(CPPDEFINES=["B2_USER_SETTINGS"])
# Configure Box2D build environment
env_thirdparty = env_godot_box2d.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
# Module files
module_subdirs = [
"",
"util/",
"editor/",
"scene/2d/",
"scene/resources/",
]
for f in module_subdirs:
env_godot_box2d.add_source_files(env.modules_sources, f + "*.cpp")