Camera tracking integration
[blender.git] / source / blender / blenkernel / SConscript
1 #!/usr/bin/python
2 Import ('env')
3 import os
4
5 sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp')
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 += ' #/intern/smoke/extern'
16 incs += ' #/intern/mikktspace'
17 incs += ' #/intern/audaspace/intern'
18 incs += ' #/intern/ffmpeg'
19
20 incs += ' ' + env['BF_OPENGL_INC']
21 incs += ' ' + env['BF_ZLIB_INC']
22
23 defs = [ 'GLEW_STATIC' ]
24
25 defs.append('WITH_SMOKE')  # TODO, make optional
26 defs.append('WITH_FRAMESERVER')  # TODO, make optional
27
28 if env['WITH_BF_PYTHON']:
29     incs += ' ../python'
30     incs += ' ' + env['BF_PYTHON_INC']
31     defs.append('WITH_PYTHON')
32     if env['BF_DEBUG']:
33         defs.append('DEBUG')
34
35 if env['WITH_BF_ELTOPO']:
36     incs += ' ../../../extern/eltopo'
37     defs.append('WITH_ELTOPO')
38         
39 if env['WITH_BF_QUICKTIME']:
40     incs += ' ../quicktime'
41
42 if env['WITH_BF_SDL']:
43     incs += ' ' + env['BF_SDL_INC']
44 else:
45     defs.append('DISABLE_SDL')
46
47 if env['WITH_BF_OPENEXR']:
48     defs.append('WITH_OPENEXR')
49
50 if env['WITH_BF_TIFF']:
51     defs.append('WITH_TIFF')
52
53 if env['WITH_BF_OPENJPEG']:
54     defs.append('WITH_OPENJPEG')
55
56 if env['WITH_BF_DDS']:
57     defs.append('WITH_DDS')
58
59 if env['WITH_BF_CINEON']:
60     defs.append('WITH_CINEON')
61
62 if env['WITH_BF_HDR']:
63     defs.append('WITH_HDR')
64
65 if env['WITH_BF_JACK']:
66     defs.append('WITH_JACK')
67
68 if env['WITH_BF_FFMPEG']:
69     defs.append('WITH_FFMPEG')
70     incs += ' ' + env['BF_FFMPEG_INC']
71
72 if env['WITH_BF_QUICKTIME']:
73     defs.append('WITH_QUICKTIME')
74     incs += ' ' + env['BF_QUICKTIME_INC']
75
76 if env['WITH_BF_BULLET']:
77     defs.append('USE_BULLET')
78
79 if env['OURPLATFORM'] == 'darwin':
80     if env['WITH_BF_OPENMP']:
81        defs.append('PARALLEL=1')
82
83 if env['BF_NO_ELBEEM']:
84     defs.append('DISABLE_ELBEEM')
85
86 if env['WITH_BF_LZO']:
87     incs += ' #/extern/lzo/minilzo'
88     defs.append('WITH_LZO')
89
90 if env['WITH_BF_LZMA']:
91     incs += ' #/extern/lzma'
92     defs.append('WITH_LZMA')
93
94 if env['WITH_BF_GAMEENGINE']:
95     incs += ' #/extern/recastnavigation/Recast/Include'
96     defs.append('WITH_GAMEENGINE')
97 else:
98     sources.remove('intern' + os.sep + 'navmesh_conversion.cpp')
99
100 if env['WITH_BF_LIBMV']:
101     incs += ' #/extern/libmv'
102     defs.append('WITH_LIBMV')
103
104 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
105     incs += ' ' + env['BF_PTHREADS_INC']
106
107 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
108     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
109 else:
110     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )