fe27e78abc0beb6ada1227776ea82128b0e223d1
[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 += ' ../bmesh'
16 incs += ' #/intern/smoke/extern'
17 incs += ' #/intern/mikktspace'
18 incs += ' #/intern/audaspace/intern'
19 incs += ' #/intern/ffmpeg'
20
21 incs += ' ' + env['BF_OPENGL_INC']
22 incs += ' ' + env['BF_ZLIB_INC']
23
24 defs = [ 'GLEW_STATIC' ]
25
26 if env['WITH_BF_SMOKE']:
27     defs.append('WITH_SMOKE')
28
29 defs.append('WITH_FRAMESERVER')  # TODO, make optional
30
31 if env['WITH_BF_PYTHON']:
32     incs += ' ../python'
33     incs += ' ' + env['BF_PYTHON_INC']
34     defs.append('WITH_PYTHON')
35     if env['BF_DEBUG']:
36         defs.append('DEBUG')
37
38 if env['WITH_BF_ELTOPO']:
39     incs += ' ../../../extern/eltopo'
40     defs.append('WITH_ELTOPO')
41         
42 if env['WITH_BF_QUICKTIME']:
43     incs += ' ../quicktime'
44
45 if env['WITH_BF_SDL']:
46     incs += ' ' + env['BF_SDL_INC']
47     defs.append('WITH_SDL')
48
49 if env['WITH_BF_OPENEXR']:
50     defs.append('WITH_OPENEXR')
51
52 if env['WITH_BF_TIFF']:
53     defs.append('WITH_TIFF')
54
55 if env['WITH_BF_OPENJPEG']:
56     defs.append('WITH_OPENJPEG')
57
58 if env['WITH_BF_DDS']:
59     defs.append('WITH_DDS')
60
61 if env['WITH_BF_CINEON']:
62     defs.append('WITH_CINEON')
63
64 if env['WITH_BF_HDR']:
65     defs.append('WITH_HDR')
66
67 if env['WITH_BF_JACK']:
68     defs.append('WITH_JACK')
69
70 if env['WITH_BF_FFMPEG']:
71     defs.append('WITH_FFMPEG')
72     incs += ' ' + env['BF_FFMPEG_INC']
73
74 if env['WITH_BF_QUICKTIME']:
75     defs.append('WITH_QUICKTIME')
76     incs += ' ' + env['BF_QUICKTIME_INC']
77
78 if env['WITH_BF_BULLET']:
79     defs.append('USE_BULLET')
80
81 if env['OURPLATFORM'] == 'darwin':
82     if env['WITH_BF_OPENMP']:
83        defs.append('PARALLEL=1')
84
85 if env['WITH_BF_FLUID']:
86     defs.append('WITH_MOD_FLUID')
87
88 if env['WITH_BF_OCEANSIM']:
89     defs.append('WITH_OCEANSIM')
90
91 if env['WITH_BF_LZO']:
92     incs += ' #/extern/lzo/minilzo'
93     defs.append('WITH_LZO')
94
95 if env['WITH_BF_LZMA']:
96     incs += ' #/extern/lzma'
97     defs.append('WITH_LZMA')
98
99 if env['WITH_BF_GAMEENGINE']:
100     incs += ' #/extern/recastnavigation'
101     defs.append('WITH_GAMEENGINE')
102 else:
103     sources.remove('intern' + os.sep + 'navmesh_conversion.c')
104
105 if env['WITH_BF_LIBMV']:
106     incs += ' #/extern/libmv'
107     defs.append('WITH_LIBMV')
108
109 if env['WITH_BF_FFTW3']:
110     defs.append('FFTW3=1')
111     incs += ' ' + env['BF_FFTW3_INC'] 
112
113 if env['WITH_BF_INTERNATIONAL']:
114     defs.append('WITH_INTERNATIONAL')
115
116 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
117     incs += ' ' + env['BF_PTHREADS_INC']
118
119 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
120     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
121 else:
122     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )