Fix segfault on collisions between dynamic complex (polyheder) and dynamic convex...
[blender-staging.git] / extern / solid / SConscript
1 import sys
2 solid_env = Environment()
3
4 # Import the C flags set in the SConstruct file
5 #Import ('cflags')
6 #Import ('cxxflags')
7 #Import ('defines')
8 Import ('user_options_dict')
9 defines = ['USE_DOUBLES','QHULL', '_LIB']
10 cflags = []
11 cxxflags = []
12
13 if sys.platform=='win32':
14     defines += ['WIN32','NDEBUG', '_WINDOWS', '_LIB']
15     cflags += ['/MT', '/W3', '/GX', '/O2']
16 elif sys.platform=='linux2' or sys.platform=='linux-i386':
17     defines += ['NDEBUG']
18     cflags += ['-O2']
19 else:
20     print "################################################"
21     print 
22     print "Check if solid builds on your platform correctly"
23     print "Add your platform specific defines"
24     print "and cflags / cxxflags to the"
25     print "extern/solid/SConscript file"
26
27 solid_env.Append (CCFLAGS = cflags)
28 solid_env.Append (CPPFLAGS = cxxflags)
29
30 solid_env.Append (CPPDEFINES = defines)
31
32 solid_sources = ['src/DT_C-api.cpp',
33                 'src/DT_Encounter.cpp',
34                 'src/DT_Object.cpp',
35                 'src/DT_RespTable.cpp',
36                 'src/DT_Scene.cpp']
37
38 convex_sources = ['src/convex/DT_Accuracy.cpp',
39                 'src/convex/DT_Box.cpp',
40                 'src/convex/DT_Cone.cpp',
41                 'src/convex/DT_Convex.cpp',
42                 'src/convex/DT_Cylinder.cpp',
43                 'src/convex/DT_Facet.cpp',
44                 'src/convex/DT_LineSegment.cpp',
45                 'src/convex/DT_PenDepth.cpp',
46                 'src/convex/DT_Point.cpp',
47                 'src/convex/DT_Polyhedron.cpp',
48                 'src/convex/DT_Polytope.cpp',
49                 'src/convex/DT_Sphere.cpp',
50                 'src/convex/DT_Triangle.cpp']
51                 
52 complex_sources = ['src/complex/DT_BBoxTree.cpp',
53                 'src/complex/DT_Complex.cpp']
54
55 broad_sources = ['src/broad/BP_C-api.cpp',
56                 'src/broad/BP_EndpointList.cpp',
57                 'src/broad/BP_Proxy.cpp',
58                 'src/broad/BP_Scene.cpp']
59
60 solid_env.Append (CPPPATH = ['include',
61                              'src',
62                              'src/broad',
63                              'src/complex',
64                              'src/convex',
65                              '../qhull/include'])
66 source_files = solid_sources + convex_sources + complex_sources + broad_sources
67
68 solid_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/extern_solid', source=source_files)