9d19e1c29b4c366a8d512bd30e43c817c085a175
[blender.git] / source / blender / blenkernel / 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 Import ('env')
29 import os
30
31 sources = env.Glob('intern/*.c')
32 sources.remove('intern' + os.sep + 'mask_rasterize.c')
33 sources.remove('intern' + os.sep + 'mask_evaluate.c')
34 sources.remove('intern' + os.sep + 'mask.c')
35
36 sources_mask = env.Glob('intern/mask*.c')
37
38 incs = [
39     '.',
40     '#/extern/libmv',
41     '#/intern/ffmpeg',
42     '#/intern/guardedalloc',
43     '#/intern/memutil',
44     '#/intern/mikktspace',
45     '#/intern/raskter',
46     '#/intern/rigidbody',
47     '#/extern/bullet2/src',
48     env['BF_GLEW_INC'],
49     '#/intern/ghost',
50     '#/intern/glew-mx',
51     '#/intern/audaspace/intern',
52     '#/intern/elbeem/extern',
53     '#/intern/iksolver/extern',
54     '#/intern/smoke/extern',
55     '#/intern/atomic',
56     '../avi',
57     '../blenfont',
58     '../blenlib',
59     '../blenloader',
60     '../bmesh',
61     '../depsgraph',
62     '../gpu',
63     '../ikplugin',
64     '../imbuf',
65     '../makesdna',
66     '../makesrna',
67     '../modifiers',
68     '../nodes',
69     '../physics',
70     '../render/extern/include',
71     '../windowmanager',
72     env['BF_ZLIB_INC'],
73     ]
74 incs = ' '.join(incs)
75
76 defs = env['BF_GL_DEFINITIONS']
77
78 if env['WITH_BF_SMOKE']:
79     defs.append('WITH_SMOKE')
80
81 if env['WITH_BF_FRAMESERVER']:
82     defs.append('WITH_FRAMESERVER')
83
84 if env['WITH_BF_PYTHON']:
85     incs += ' ../python'
86     defs.append('WITH_PYTHON')
87     if env['BF_DEBUG']:
88         defs.append('DEBUG')
89
90 '''
91 if env['WITH_BF_ELTOPO']:
92     incs += ' #/extern/eltopo'
93     incs += ' #/extern/eltopo/eltopo3d'
94     defs.append('WITH_ELTOPO')
95 '''
96 if env['WITH_BF_QUICKTIME']:
97     incs += ' ../quicktime'
98
99 if env['WITH_BF_SDL']:
100     incs += ' ' + env['BF_SDL_INC']
101     defs.append('WITH_SDL')
102
103 if env['WITH_BF_OIIO']:
104     defs.append('WITH_OPENIMAGEIO')
105
106 if env['WITH_BF_OPENEXR']:
107     defs.append('WITH_OPENEXR')
108
109 if env['WITH_BF_TIFF']:
110     defs.append('WITH_TIFF')
111
112 if env['WITH_BF_OPENJPEG']:
113     defs.append('WITH_OPENJPEG')
114
115 if env['WITH_BF_DDS']:
116     defs.append('WITH_DDS')
117
118 if env['WITH_BF_CINEON']:
119     defs.append('WITH_CINEON')
120
121 if env['WITH_BF_HDR']:
122     defs.append('WITH_HDR')
123
124 if env['WITH_BF_JACK']:
125     defs.append('WITH_JACK')
126
127 if env['WITH_BF_FFMPEG']:
128     defs.append('WITH_FFMPEG')
129     incs += ' ' + env['BF_FFMPEG_INC']
130
131 if env['WITH_BF_QUICKTIME']:
132     defs.append('WITH_QUICKTIME')
133     incs += ' ' + env['BF_QUICKTIME_INC']
134
135 if env['WITH_BF_BULLET']:
136     defs.append('WITH_BULLET')
137
138 if env['WITH_BF_FLUID']:
139     defs.append('WITH_MOD_FLUID')
140
141 if env['WITH_BF_OCEANSIM']:
142     defs.append('WITH_OCEANSIM')
143
144 if env['WITH_BF_LZO']:
145     incs += ' #/extern/lzo/minilzo'
146     defs.append('WITH_LZO')
147
148 if env['WITH_BF_LZMA']:
149     incs += ' #/extern/lzma'
150     defs.append('WITH_LZMA')
151
152 if env['WITH_BF_GAMEENGINE']:
153     incs += ' #/extern/recastnavigation'
154     defs.append('WITH_GAMEENGINE')
155 else:
156     sources.remove('intern' + os.sep + 'navmesh_conversion.c')
157
158 if env['WITH_BF_LIBMV']:
159     defs.append('WITH_LIBMV')
160
161 if env['WITH_BF_FFTW3']:
162     defs.append('FFTW3=1')
163     incs += ' ' + env['BF_FFTW3_INC'] 
164
165 if env['WITH_BF_INTERNATIONAL']:
166     defs.append('WITH_INTERNATIONAL')
167
168 if env['WITH_BF_FREESTYLE']:
169     defs.append('WITH_FREESTYLE')
170
171 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
172     incs += ' ' + env['BF_PTHREADS_INC']
173     incs += ' ../../../intern/utfconv'
174
175 if env['WITH_BF_BINRELOC']:
176     incs += ' #extern/binreloc/include'
177     defs.append('WITH_BINRELOC')
178
179 if env['WITH_BF_LEGACY_DEPSGRAPH']:
180     defs.append('WITH_LEGACY_DEPSGRAPH')
181
182 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
183     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
184 else:
185     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )
186
187 env.BlenderLib ( libname = 'bf_blenkernel_mask', sources = sources_mask, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [200,25,0] )