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