Merging r38694 through r38739 from trunk into vgroup_modifiers
[blender.git] / source / blender / blenkernel / SConscript
1 #!/usr/bin/python
2 Import ('env')
3
4 sources = env.Glob('intern/*.c')
5
6 incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include'
7 incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager'
8 incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
9 incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers'
10 incs += ' #/intern/iksolver/extern ../blenloader'
11 incs += ' #/extern/bullet2/src'
12 incs += ' #/intern/opennl/extern #/intern/bsp/extern'
13 incs += ' ../gpu #/extern/glew/include'
14 incs += ' #/intern/smoke/extern'
15 incs += ' #/intern/mikktspace'
16 incs += ' #/intern/audaspace/intern'
17 incs += ' #/intern/ffmpeg'
18
19 incs += ' ' + env['BF_OPENGL_INC']
20 incs += ' ' + env['BF_ZLIB_INC']
21
22 defs = [ 'GLEW_STATIC' ]
23
24 defs.append('WITH_SMOKE')  # TODO, make optional
25 defs.append('WITH_FRAMESERVER')  # TODO, make optional
26
27 if env['WITH_BF_PYTHON']:
28     incs += ' ../python'
29     incs += ' ' + env['BF_PYTHON_INC']
30     defs.append('WITH_PYTHON')
31     if env['BF_DEBUG']:
32         defs.append('DEBUG')
33
34 if env['WITH_BF_ELTOPO']:
35     incs += ' ../../../extern/eltopo'
36     defs.append('WITH_ELTOPO')
37         
38 if env['WITH_BF_QUICKTIME']:
39     incs += ' ../quicktime'
40
41 if env['WITH_BF_SDL']:
42     incs += ' ' + env['BF_SDL_INC']
43 else:
44     defs.append('DISABLE_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['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
94     incs += ' ' + env['BF_PTHREADS_INC']
95
96 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
97     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
98 else:
99     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )