Merged changes in the trunk up to revision 52690.
[blender.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 '''
45 if env['WITH_BF_ELTOPO']:
46     incs += ' #/extern/eltopo'
47     incs += ' #/extern/eltopo/eltopo3d'
48     defs.append('WITH_ELTOPO')
49 '''
50 if env['WITH_BF_QUICKTIME']:
51     incs += ' ../quicktime'
52
53 if env['WITH_BF_SDL']:
54     incs += ' ' + env['BF_SDL_INC']
55     defs.append('WITH_SDL')
56
57 if env['WITH_BF_OPENEXR']:
58     defs.append('WITH_OPENEXR')
59
60 if env['WITH_BF_TIFF']:
61     defs.append('WITH_TIFF')
62
63 if env['WITH_BF_OPENJPEG']:
64     defs.append('WITH_OPENJPEG')
65
66 if env['WITH_BF_DDS']:
67     defs.append('WITH_DDS')
68
69 if env['WITH_BF_CINEON']:
70     defs.append('WITH_CINEON')
71
72 if env['WITH_BF_HDR']:
73     defs.append('WITH_HDR')
74
75 if env['WITH_BF_JACK']:
76     defs.append('WITH_JACK')
77
78 if env['WITH_BF_FFMPEG']:
79     defs.append('WITH_FFMPEG')
80     incs += ' ' + env['BF_FFMPEG_INC']
81
82 if env['WITH_BF_QUICKTIME']:
83     defs.append('WITH_QUICKTIME')
84     incs += ' ' + env['BF_QUICKTIME_INC']
85
86 if env['WITH_BF_BULLET']:
87     defs.append('USE_BULLET')
88
89 if env['OURPLATFORM'] == 'darwin':
90     if env['WITH_BF_OPENMP']:
91        defs.append('PARALLEL=1')
92
93 if env['WITH_BF_FLUID']:
94     defs.append('WITH_MOD_FLUID')
95
96 if env['WITH_BF_OCEANSIM']:
97     defs.append('WITH_OCEANSIM')
98
99 if env['WITH_BF_LZO']:
100     incs += ' #/extern/lzo/minilzo'
101     defs.append('WITH_LZO')
102
103 if env['WITH_BF_LZMA']:
104     incs += ' #/extern/lzma'
105     defs.append('WITH_LZMA')
106
107 if env['WITH_BF_GAMEENGINE']:
108     incs += ' #/extern/recastnavigation'
109     defs.append('WITH_GAMEENGINE')
110 else:
111     sources.remove('intern' + os.sep + 'navmesh_conversion.c')
112
113 if env['WITH_BF_LIBMV']:
114     incs += ' #/extern/libmv'
115     defs.append('WITH_LIBMV')
116
117 if env['WITH_BF_FFTW3']:
118     defs.append('FFTW3=1')
119     incs += ' ' + env['BF_FFTW3_INC'] 
120
121 if env['WITH_BF_INTERNATIONAL']:
122     defs.append('WITH_INTERNATIONAL')
123
124 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
125     incs += ' ' + env['BF_PTHREADS_INC']
126
127
128 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
129     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
130 else:
131     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )
132
133 env.BlenderLib ( libname = 'bf_blenkernel_mask', sources = sources_mask, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [200,25,0] )