Fix T39597: Missing entries in VSE Preview menu
[blender.git] / source / blender / python / SConscript
1 #!/usr/bin/env python
2 #
3 # ***** BEGIN GPL LICENSE BLOCK *****
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #
19 # The Original Code is Copyright (C) 2006, Blender Foundation
20 # All rights reserved.
21 #
22 # The Original Code is: all of this file.
23 #
24 # Contributor(s): Nathan Letwory.
25 #
26 # ***** END GPL LICENSE BLOCK *****
27
28 # TODO, split into 3 files.
29
30 Import ('env')
31
32 incs = [
33     '.',
34     '#/intern/guardedalloc',
35     '#/intern/memutil',
36     '#/extern/glew/include',
37     '#/intern/audaspace/intern',
38     '#/intern/cycles/blender',
39     '../blenfont',
40     '../blenkernel',
41     '../blenlib',
42     '../blenloader',
43     '../bmesh',
44     '../editors/include',
45     '../gpu',
46     '../imbuf',
47     '../makesdna',
48     '../makesrna',
49     '../nodes',
50     '../render/extern/include',
51     '../windowmanager',
52     env['BF_PYTHON_INC'],
53     ]
54 incs = ' '.join(incs)
55
56 is_debug = (env['OURPLATFORM'] in ('win32-mingw', 'win32-vc','win64-vc', 'win64-mingw') and env['BF_DEBUG'])
57
58 # bmesh
59 defs = []
60
61 sources = env.Glob('bmesh/*.c')
62 env.BlenderLib( libname = 'bf_python_bmesh', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [362,165])
63
64 # generic
65 defs = ['GLEW_STATIC']
66
67 if is_debug:
68     defs.append('_DEBUG')
69
70 sources = env.Glob('generic/*.c')
71 env.BlenderLib( libname = 'bf_python_ext', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [363,165]) # ketsji is 360
72
73
74 # mathutils
75 defs = []
76
77 sources = env.Glob('mathutils/*.c')
78 env.BlenderLib( libname = 'bf_python_mathutils', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [362,165])
79
80
81 # bpy
82 defs = []
83
84 if is_debug:
85     defs.append('_DEBUG')
86
87 if env['WITH_BF_PYTHON_SAFETY']:
88     defs.append('WITH_PYTHON_SAFETY')
89
90 if env['BF_BUILDINFO']:
91     defs.append('BUILD_DATE')
92
93
94 # Audaspace is always on currently
95
96 if env['WITH_BF_BULLET']:
97     defs.append('WITH_BULLET')
98
99 # AVI is always on currently
100
101 if env['WITH_BF_FFMPEG']:
102     defs.append('WITH_FFMPEG')
103     incs += ' ' + env['BF_FFMPEG_INC']
104
105 if env['WITH_BF_QUICKTIME']:
106     defs.append('WITH_QUICKTIME')
107
108 if env['WITH_BF_SNDFILE']:
109     defs.append('WITH_SNDFILE')
110
111 if env['WITH_BF_COMPOSITOR']:
112     defs.append('WITH_COMPOSITOR')
113
114 if env['WITH_BF_CYCLES']:
115     defs.append('WITH_CYCLES')
116
117 if env['WITH_BF_CYCLES_OSL']:
118     defs.append('WITH_CYCLES_OSL')
119
120 if env['WITH_BF_FREESTYLE']:
121     incs += ' ../freestyle/intern/python'
122     defs.append('WITH_FREESTYLE')
123
124 if env['WITH_BF_GAMEENGINE']:
125     defs.append('WITH_GAMEENGINE')
126
127 if env['WITH_BF_CINEON']:
128     defs.append('WITH_CINEON')
129
130 if env['WITH_BF_DDS']:
131     defs.append('WITH_DDS')
132
133 if env['WITH_BF_FRAMESERVER']:
134     defs.append('WITH_FRAMESERVER')
135
136 if env['WITH_BF_HDR']:
137     defs.append('WITH_HDR')
138
139 if env['WITH_BF_OPENEXR']:
140     defs.append('WITH_OPENEXR')
141
142 if env['WITH_BF_OPENJPEG']:
143     defs.append('WITH_OPENJPEG')
144
145 if env['WITH_BF_REDCODE']:
146     defs.append('WITH_REDCODE')
147
148 if env['WITH_BF_TIFF']:
149     defs.append('WITH_TIFF')
150
151 # NDof is always on currently
152
153 if env['WITH_BF_INTERNATIONAL']:
154     defs.append('WITH_INTERNATIONAL')
155
156 if env['WITH_BF_OPENAL']:
157     defs.append('WITH_OPENAL')
158
159 if env['WITH_BF_SDL']:
160     defs.append('WITH_SDL')
161
162 if env['WITH_BF_JACK']:
163     defs.append('WITH_JACK')
164
165 if env['WITH_BF_LIBMV']:
166     defs.append('WITH_LIBMV')
167
168 if env['WITH_BF_BOOLEAN']:
169     defs.append('WITH_MOD_BOOLEAN')
170
171 if env['WITH_BF_FLUID']:
172     defs.append('WITH_MOD_FLUID')
173
174 if env['WITH_BF_OCEANSIM']:
175     defs.append('WITH_OCEANSIM')
176
177 if env['WITH_BF_REMESH']:
178     defs.append('WITH_MOD_REMESH')
179
180 if env['WITH_BF_SMOKE']:
181     defs.append('WITH_SMOKE')
182
183 if env['WITH_BF_COLLADA']:
184     defs.append('WITH_COLLADA')
185
186 if env['WITH_BF_OCIO']:
187     defs.append('WITH_OCIO')
188     incs += ' ' + '#/intern/opencolorio'
189
190 if env['WITH_BF_OIIO']:
191     defs.append('WITH_OPENIMAGEIO')
192     incs += ' ../imbuf/intern/oiio'
193
194 if env['WITH_BF_PLAYER']:
195     defs.append('WITH_PLAYER')
196     
197
198 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-mingw', 'linuxcross', 'win64-vc'):
199     incs += ' ' + env['BF_PTHREADS_INC']
200
201 sources = env.Glob('intern/*.c')
202 env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [361])