0.2.0-dev Download ZIP
45 lines ·1.1 KB Raw
| 1 | #!/usr/bin/env python |
| 2 | from misc.utility.scons_hints import * |
| 3 | |
| 4 | Import("env") |
| 5 | Import("env_modules") |
| 6 | |
| 7 | env_vhacd = env_modules.Clone() |
| 8 | |
| 9 | # Thirdparty source files |
| 10 | |
| 11 | thirdparty_obj = [] |
| 12 | |
| 13 | thirdparty_dir = "#thirdparty/vhacd/" |
| 14 | |
| 15 | thirdparty_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 | |
| 28 | thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] |
| 29 | |
| 30 | env_vhacd.Prepend(CPPPATH=[thirdparty_dir + "inc"]) |
| 31 | |
| 32 | env_thirdparty = env_vhacd.Clone() |
| 33 | env_thirdparty.disable_warnings() |
| 34 | env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) |
| 35 | env.modules_sources += thirdparty_obj |
| 36 | |
| 37 | # Godot source files |
| 38 | |
| 39 | module_obj = [] |
| 40 | |
| 41 | env_vhacd.add_source_files(module_obj, "*.cpp") |
| 42 | env.modules_sources += module_obj |
| 43 | |
| 44 | # Needed to force rebuilding the module files when the thirdparty library is updated. |
| 45 | env.Depends(module_obj, thirdparty_obj) |