Skip to content
0.2.0-dev Download ZIP
45 lines ·1.1 KB Raw
1#!/usr/bin/env python
2from misc.utility.scons_hints import *
3
4Import("env")
5Import("env_modules")
6
7env_vhacd = env_modules.Clone()
8
9# Thirdparty source files
10
11thirdparty_obj = []
12
13thirdparty_dir = "#thirdparty/vhacd/"
14
15thirdparty_sources = [
16 "src/vhacdManifoldMesh.cpp",
17 "src/FloatMath.cpp",
18 "src/vhacdMesh.cpp",
19 "src/vhacdICHull.cpp",
20 "src/vhacdVolume.cpp",
21 "src/VHACD-ASYNC.cpp",
22 "src/btAlignedAllocator.cpp",
23 "src/vhacdRaycastMesh.cpp",
24 "src/VHACD.cpp",
25 "src/btConvexHullComputer.cpp",
26]
27
28thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
29
30env_vhacd.Prepend(CPPPATH=[thirdparty_dir + "inc"])
31
32env_thirdparty = env_vhacd.Clone()
33env_thirdparty.disable_warnings()
34env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
35env.modules_sources += thirdparty_obj
36
37# Godot source files
38
39module_obj = []
40
41env_vhacd.add_source_files(module_obj, "*.cpp")
42env.modules_sources += module_obj
43
44# Needed to force rebuilding the module files when the thirdparty library is updated.
45env.Depends(module_obj, thirdparty_obj)