Skip to content
0.2.0-dev Download ZIP
44 lines ·1.1 KB Raw
1#!/usr/bin/env python
2from misc.utility.scons_hints import *
3
4Import("env")
5Import("env_modules")
6
7env_navigation_2d = env_modules.Clone()
8
9# Thirdparty source files
10
11thirdparty_obj = []
12
13# RVO 2D Thirdparty source files
14if env["builtin_rvo2_2d"]:
15 thirdparty_dir = "#thirdparty/rvo2/rvo2_2d/"
16 thirdparty_sources = [
17 "Agent2d.cpp",
18 "Obstacle2d.cpp",
19 "KdTree2d.cpp",
20 "RVOSimulator2d.cpp",
21 ]
22 thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
23
24 env_navigation_2d.Prepend(CPPPATH=[thirdparty_dir])
25
26 env_thirdparty = env_navigation_2d.Clone()
27 env_thirdparty.disable_warnings()
28 env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
29
30
31env.modules_sources += thirdparty_obj
32
33# Godot source files
34
35module_obj = []
36
37env_navigation_2d.add_source_files(module_obj, "*.cpp")
38env_navigation_2d.add_source_files(module_obj, "2d/*.cpp")
39if env.editor_build:
40 env_navigation_2d.add_source_files(module_obj, "editor/*.cpp")
41env.modules_sources += module_obj
42
43# Needed to force rebuilding the module files when the thirdparty library is updated.
44env.Depends(module_obj, thirdparty_obj)