merge with trunk at r31523
[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 += ' ../bmesh'
15 incs += ' #/intern/smoke/extern'
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 not env['WITH_BF_PYTHON']:
24         defs.append('DISABLE_PYTHON')
25 else:
26         incs += ' ../python'
27         incs += ' ' + env['BF_PYTHON_INC']
28         if env['BF_DEBUG']:
29                 defs.append('_DEBUG')
30
31 if env['WITH_BF_QUICKTIME']:
32         incs += ' ../quicktime'
33
34 if env['WITH_BF_SDL']:
35         incs += ' ' + env['BF_SDL_INC']
36 else:
37         defs.append('DISABLE_SDL')
38
39 if env['WITH_BF_OPENEXR']:
40         defs.append('WITH_OPENEXR')
41
42 if env['WITH_BF_TIFF']:
43         defs.append('WITH_TIFF')
44
45 if env['WITH_BF_OPENJPEG']:
46         defs.append('WITH_OPENJPEG')
47
48 if env['WITH_BF_DDS']:
49         defs.append('WITH_DDS')
50
51 if env['WITH_BF_CINEON']:
52         defs.append('WITH_CINEON')
53
54 if env['WITH_BF_HDR']:
55         defs.append('WITH_HDR')
56
57 if env['WITH_BF_FFMPEG']:
58         defs.append('WITH_FFMPEG')
59         incs += ' ' + env['BF_FFMPEG_INC']
60
61 if env['WITH_BF_QUICKTIME']:
62         defs.append('WITH_QUICKTIME')
63         incs += ' ' + env['BF_QUICKTIME_INC']
64
65 if env['WITH_BF_BULLET']:
66         defs.append('USE_BULLET')
67
68 if env['OURPLATFORM'] == 'darwin':
69     if env['WITH_BF_OPENMP']:
70        defs.append('PARALLEL=1')
71
72 if env['BF_NO_ELBEEM']:
73         defs.append('DISABLE_ELBEEM')
74
75 if env['WITH_BF_LCMS']:
76         defs.append('WITH_LCMS')
77         incs += ' ' + env['BF_LCMS_INC']
78
79 if env['WITH_BF_LZO']:
80         incs += ' #/extern/lzo/minilzo'
81         defs.append('WITH_LZO')
82
83 if env['WITH_BF_LZMA']:
84         incs += ' #/extern/lzma'
85         defs.append('WITH_LZMA')
86
87 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
88     incs += ' ' + env['BF_PTHREADS_INC']
89
90 env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25] )