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