Merging r41120 through from trunk r41139 into soc-2011-tomato
[blender.git] / source / blender / blenkernel / SConscript
1 #!/usr/bin/python
2 Import ('env')
3 import os
4
5 sources = env.Glob('intern/*.c')
6
7 incs = '. #/intern/guardedalloc #/intern/memutil'
8 incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager'
9 incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
10 incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers'
11 incs += ' #/intern/iksolver/extern ../blenloader'
12 incs += ' #/extern/bullet2/src'
13 incs += ' #/intern/opennl/extern #/intern/bsp/extern'
14 incs += ' ../gpu #/extern/glew/include'
15 incs += ' #/intern/smoke/extern'
16 incs += ' #/intern/mikktspace'
17 incs += ' #/intern/audaspace/intern'
18 incs += ' #/intern/ffmpeg'
19
20 incs += ' ' + env['BF_OPENGL_INC']
21 incs += ' ' + env['BF_ZLIB_INC']
22
23 defs = [ 'GLEW_STATIC' ]
24
25 defs.append('WITH_SMOKE')  # TODO, make optional
26 defs.append('WITH_FRAMESERVER')  # TODO, make optional
27
28 if env['WITH_BF_PYTHON']:
29     incs += ' ../python'
30     incs += ' ' + env['BF_PYTHON_INC']
31     defs.append('WITH_PYTHON')
32     if env['BF_DEBUG']:
33         defs.append('DEBUG')
34
35 if env['WITH_BF_ELTOPO']:
36     incs += ' ../../../extern/eltopo'
37     defs.append('WITH_ELTOPO')
38         
39 if env['WITH_BF_QUICKTIME']:
40     incs += ' ../quicktime'
41
42 if env['WITH_BF_SDL']:
43     incs += ' ' + env['BF_SDL_INC']
44     defs.append('WITH_SDL')
45
46 if env['WITH_BF_OPENEXR']:
47     defs.append('WITH_OPENEXR')
48
49 if env['WITH_BF_TIFF']:
50     defs.append('WITH_TIFF')
51
52 if env['WITH_BF_OPENJPEG']:
53     defs.append('WITH_OPENJPEG')
54
55 if env['WITH_BF_DDS']:
56     defs.append('WITH_DDS')
57
58 if env['WITH_BF_CINEON']:
59     defs.append('WITH_CINEON')
60
61 if env['WITH_BF_HDR']:
62     defs.append('WITH_HDR')
63
64 if env['WITH_BF_JACK']:
65     defs.append('WITH_JACK')
66
67 if env['WITH_BF_FFMPEG']:
68     defs.append('WITH_FFMPEG')
69     incs += ' ' + env['BF_FFMPEG_INC']
70
71 if env['WITH_BF_QUICKTIME']:
72     defs.append('WITH_QUICKTIME')
73     incs += ' ' + env['BF_QUICKTIME_INC']
74
75 if env['WITH_BF_BULLET']:
76     defs.append('USE_BULLET')
77
78 if env['OURPLATFORM'] == 'darwin':
79     if env['WITH_BF_OPENMP']:
80        defs.append('PARALLEL=1')
81
82 if env['BF_NO_ELBEEM']:
83     defs.append('DISABLE_ELBEEM')
84
85 if env['WITH_BF_LZO']:
86     incs += ' #/extern/lzo/minilzo'
87     defs.append('WITH_LZO')
88
89 if env['WITH_BF_LZMA']:
90     incs += ' #/extern/lzma'
91     defs.append('WITH_LZMA')
92
93 if env['WITH_BF_GAMEENGINE']:
94     incs += ' #/extern/recastnavigation'
95     defs.append('WITH_GAMEENGINE')
96 else:
97     sources.remove('intern' + os.sep + 'navmesh_conversion.c')
98
99 if env['WITH_BF_LIBMV']:
100     incs += ' #/extern/libmv'
101     defs.append('WITH_LIBMV')
102
103 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
104     incs += ' ' + env['BF_PTHREADS_INC']
105
106 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
107     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
108 else:
109     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )