| 1 |
|
| 2 |
from misc.utility.scons_hints import * |
| 3 |
|
| 4 |
Import("env") |
| 5 |
Import("env_modules") |
| 6 |
|
| 7 |
env_csg = env_modules.Clone() |
| 8 |
|
| 9 |
env_csg.Append(CPPDEFINES=[("MANIFOLD_PAR", -1)]) |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
thirdparty_obj = [] |
| 14 |
|
| 15 |
thirdparty_dir = "#thirdparty/manifold/" |
| 16 |
thirdparty_sources = [ |
| 17 |
"src/boolean_result.cpp", |
| 18 |
"src/boolean3.cpp", |
| 19 |
"src/constructors.cpp", |
| 20 |
"src/csg_tree.cpp", |
| 21 |
"src/edge_op.cpp", |
| 22 |
"src/face_op.cpp", |
| 23 |
"src/impl.cpp", |
| 24 |
"src/manifold.cpp", |
| 25 |
"src/polygon.cpp", |
| 26 |
"src/properties.cpp", |
| 27 |
"src/quickhull.cpp", |
| 28 |
"src/sdf.cpp", |
| 29 |
"src/smoothing.cpp", |
| 30 |
"src/sort.cpp", |
| 31 |
"src/subdivision.cpp", |
| 32 |
"src/tree2d.cpp", |
| 33 |
] |
| 34 |
|
| 35 |
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] |
| 36 |
env_csg.Prepend(CPPPATH=[thirdparty_dir + "include"]) |
| 37 |
env_thirdparty = env_csg.Clone() |
| 38 |
env_thirdparty.disable_warnings() |
| 39 |
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) |
| 40 |
env.modules_sources += thirdparty_obj |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
module_obj = [] |
| 45 |
|
| 46 |
env_csg.add_source_files(module_obj, "*.cpp") |
| 47 |
|
| 48 |
if env.editor_build: |
| 49 |
env_csg.add_source_files(module_obj, "editor/*.cpp") |
| 50 |
|
| 51 |
env.modules_sources += module_obj |
| 52 |
|
| 53 |
|
| 54 |
env.Depends(module_obj, thirdparty_obj) |