Merged changes in the trunk up to revision 52191.
[blender-staging.git] / source / blender / blenkernel / SConscript
1 #!/usr/bin/python
2 Import ('env')
3 import os
4
5 sources = env.Glob('intern/*.c')
6 sources.remove('intern' + os.sep + 'mask_rasterize.c')
7 sources.remove('intern' + os.sep + 'mask_evaluate.c')
8 sources.remove('intern' + os.sep + 'mask.c')
9
10 sources_mask = env.Glob('intern/mask*.c')
11
12 incs = '. #/intern/guardedalloc #/intern/memutil'
13 incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager'
14 incs += ' ../render/extern/include ../makesrna'
15 incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers'
16 incs += ' #/intern/iksolver/extern ../blenloader ../freestyle'
17 incs += ' #/extern/bullet2/src'
18 incs += ' #/intern/opennl/extern #/intern/bsp/extern'
19 incs += ' ../gpu #/extern/glew/include'
20 incs += ' ../bmesh'
21 incs += ' #/intern/smoke/extern'
22 incs += ' #/intern/mikktspace'
23 incs += ' #/intern/audaspace/intern'
24 incs += ' #/intern/ffmpeg'
25 incs += ' #/intern/raskter'
26
27 incs += ' ' + env['BF_OPENGL_INC']
28 incs += ' ' + env['BF_ZLIB_INC']
29
30 defs = [ 'GLEW_STATIC' ]
31
32 if env['WITH_BF_SMOKE']:
33     defs.append('WITH_SMOKE')
34
35 if env['WITH_BF_FRAMESERVER']:
36     defs.append('WITH_FRAMESERVER')
37
38 if env['WITH_BF_PYTHON']:
39     incs += ' ../python'
40     defs.append('WITH_PYTHON')
41     if env['BF_DEBUG']:
42         defs.append('DEBUG')
43
44 if env['WITH_BF_ELTOPO']:
45     incs += ' #/extern/eltopo'
46     incs += ' #/extern/eltopo/eltopo3d'
47     defs.append('WITH_ELTOPO')
48         
49 if env['WITH_BF_QUICKTIME']:
50     incs += ' ../quicktime'
51
52 if env['WITH_BF_SDL']:
53     incs += ' ' + env['BF_SDL_INC']
54     defs.append('WITH_SDL')
55
56 if env['WITH_BF_OPENEXR']:
57     defs.append('WITH_OPENEXR')
58
59 if env['WITH_BF_TIFF']:
60     defs.append('WITH_TIFF')
61
62 if env['WITH_BF_OPENJPEG']:
63     defs.append('WITH_OPENJPEG')
64
65 if env['WITH_BF_DDS']:
66     defs.append('WITH_DDS')
67
68 if env['WITH_BF_CINEON']:
69     defs.append('WITH_CINEON')
70
71 if env['WITH_BF_HDR']:
72     defs.append('WITH_HDR')
73
74 if env['WITH_BF_JACK']:
75     defs.append('WITH_JACK')
76
77 if env['WITH_BF_FFMPEG']:
78     defs.append('WITH_FFMPEG')
79     incs += ' ' + env['BF_FFMPEG_INC']
80
81 if env['WITH_BF_QUICKTIME']:
82     defs.append('WITH_QUICKTIME')
83     incs += ' ' + env['BF_QUICKTIME_INC']
84
85 if env['WITH_BF_BULLET']:
86     defs.append('USE_BULLET')
87
88 if env['OURPLATFORM'] == 'darwin':
89     if env['WITH_BF_OPENMP']:
90        defs.append('PARALLEL=1')
91
92 if env['WITH_BF_FLUID']:
93     defs.append('WITH_MOD_FLUID')
94
95 if env['WITH_BF_OCEANSIM']:
96     defs.append('WITH_OCEANSIM')
97
98 if env['WITH_BF_LZO']:
99     incs += ' #/extern/lzo/minilzo'
100     defs.append('WITH_LZO')
101
102 if env['WITH_BF_LZMA']:
103     incs += ' #/extern/lzma'
104     defs.append('WITH_LZMA')
105
106 if env['WITH_BF_GAMEENGINE']:
107     incs += ' #/extern/recastnavigation'
108     defs.append('WITH_GAMEENGINE')
109 else:
110     sources.remove('intern' + os.sep + 'navmesh_conversion.c')
111
112 if env['WITH_BF_LIBMV']:
113     incs += ' #/extern/libmv'
114     defs.append('WITH_LIBMV')
115
116 if env['WITH_BF_FFTW3']:
117     defs.append('FFTW3=1')
118     incs += ' ' + env['BF_FFTW3_INC'] 
119
120 if env['WITH_BF_INTERNATIONAL']:
121     defs.append('WITH_INTERNATIONAL')
122
123 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
124     incs += ' ' + env['BF_PTHREADS_INC']
125
126
127 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
128     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
129 else:
130     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )
131
132 env.BlenderLib ( libname = 'bf_blenkernel_mask', sources = sources_mask, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [200,25,0] )