ea19b51c0444b77ac2692d46c06bef527b1d43a3
[blender-staging.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
18 incs += ' ' + env['BF_OPENGL_INC']
19 incs += ' ' + env['BF_ZLIB_INC']
20
21 defs = [ 'GLEW_STATIC' ]
22
23 if env['WITH_BF_PYTHON']:
24     incs += ' ../python'
25     incs += ' ' + env['BF_PYTHON_INC']
26     defs.append('WITH_PYTHON')
27     if env['BF_DEBUG']:
28         defs.append('DEBUG')
29
30 if env['WITH_BF_ELTOPO']:
31     incs += ' ../../../extern/eltopo'
32     defs.append('WITH_ELTOPO')
33         
34 if env['WITH_BF_QUICKTIME']:
35     incs += ' ../quicktime'
36
37 if env['WITH_BF_SDL']:
38     incs += ' ' + env['BF_SDL_INC']
39 else:
40     defs.append('DISABLE_SDL')
41
42 if env['WITH_BF_OPENEXR']:
43     defs.append('WITH_OPENEXR')
44
45 if env['WITH_BF_TIFF']:
46     defs.append('WITH_TIFF')
47
48 if env['WITH_BF_OPENJPEG']:
49     defs.append('WITH_OPENJPEG')
50
51 if env['WITH_BF_DDS']:
52     defs.append('WITH_DDS')
53
54 if env['WITH_BF_CINEON']:
55     defs.append('WITH_CINEON')
56
57 if env['WITH_BF_HDR']:
58     defs.append('WITH_HDR')
59
60 if env['WITH_BF_JACK']:
61     defs.append('WITH_JACK')
62
63 if env['WITH_BF_FFMPEG']:
64     defs.append('WITH_FFMPEG')
65     incs += ' ' + env['BF_FFMPEG_INC']
66
67 if env['WITH_BF_QUICKTIME']:
68     defs.append('WITH_QUICKTIME')
69     incs += ' ' + env['BF_QUICKTIME_INC']
70
71 if env['WITH_BF_BULLET']:
72     defs.append('USE_BULLET')
73
74 if env['OURPLATFORM'] == 'darwin':
75     if env['WITH_BF_OPENMP']:
76        defs.append('PARALLEL=1')
77
78 if env['BF_NO_ELBEEM']:
79     defs.append('DISABLE_ELBEEM')
80
81 if env['WITH_BF_LZO']:
82     incs += ' #/extern/lzo/minilzo'
83     defs.append('WITH_LZO')
84
85 if env['WITH_BF_LZMA']:
86     incs += ' #/extern/lzma'
87     defs.append('WITH_LZMA')
88
89 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
90     incs += ' ' + env['BF_PTHREADS_INC']
91
92 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
93     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
94 else:
95     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )