- [SCONS] Added building of qhull and Solid from extern when selecting the Solid...
[blender.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 else:
17     print "################################################"
18     print 
19     print "Check if solid builds on your platform correctly"
20     print "Add your platform specific defines"
21     print "and cflags / cxxflags to the"
22     print "extern/solid/SConscript file"
23
24 solid_env.Append (CCFLAGS = cflags)
25 solid_env.Append (CPPFLAGS = cxxflags)
26
27 solid_env.Append (CPPDEFINES = defines)
28
29 solid_sources = ['src/DT_C-api.cpp',
30                 'src/DT_Encounter.cpp',
31                 'src/DT_Object.cpp',
32                 'src/DT_RespTable.cpp',
33                 'src/DT_Scene.cpp']
34
35 convex_sources = ['src/convex/DT_Accuracy.cpp',
36                 'src/convex/DT_Box.cpp',
37                 'src/convex/DT_Cone.cpp',
38                 'src/convex/DT_Convex.cpp',
39                 'src/convex/DT_Cylinder.cpp',
40                 'src/convex/DT_Facet.cpp',
41                 'src/convex/DT_LineSegment.cpp',
42                 'src/convex/DT_PenDepth.cpp',
43                 'src/convex/DT_Point.cpp',
44                 'src/convex/DT_Polyhedron.cpp',
45                 'src/convex/DT_Polytope.cpp',
46                 'src/convex/DT_Sphere.cpp',
47                 'src/convex/DT_Triangle.cpp']
48                 
49 complex_sources = ['src/complex/DT_BBoxTree.cpp',
50                 'src/complex/DT_Complex.cpp']
51
52 broad_sources = ['src/broad/BP_C-api.cpp',
53                 'src/broad/BP_EndpointList.cpp',
54                 'src/broad/BP_Proxy.cpp',
55                 'src/broad/BP_Scene.cpp']
56
57 solid_env.Append (CPPPATH = ['include',
58                              'src',
59                              'src/broad',
60                              'src/complex',
61                              'src/convex',
62                              '../qhull/include'])
63 source_files = solid_sources + convex_sources + complex_sources + broad_sources
64
65 solid_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/extern_solid', source=source_files)