svn merge -r37028:37030 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / blenkernel / CMakeLists.txt
1 # $Id$
2 # ***** BEGIN GPL LICENSE BLOCK *****
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
20 #
21 # The Original Code is: all of this file.
22 #
23 # Contributor(s): Jacques Beaurain.
24 #
25 # ***** END GPL LICENSE BLOCK *****
26
27 if(WITH_CODEC_FFMPEG)
28         # FFMPEG gives warnigns which are hard to avoid across multiple versions.
29         remove_strict_flags()
30 endif()
31
32 set(INC 
33         .
34         ../avi
35         ../blenlib
36         ../blenloader
37         ../gpu
38         ../ikplugin
39         ../imbuf
40         ../makesdna
41         ../makesrna
42         ../bmesh
43         ../modifiers
44         ../nodes
45         ../editors/include
46         ../render/extern/include
47         ../../../intern/audaspace/intern
48         ../../../intern/ffmpeg
49         ../../../intern/bsp/extern ../blenfont
50         ../../../intern/decimation/extern
51         ../../../intern/elbeem/extern
52         ../../../intern/guardedalloc
53         ../../../intern/iksolver/extern
54         ../../../intern/memutil
55         ../../../intern/opennl/extern
56         ../../../intern/smoke/extern
57         ../../../intern/mikktspace
58         ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h
59 )
60
61 set(INC_SYS
62         ${GLEW_INCLUDE_PATH}
63         ${ZLIB_INCLUDE_DIRS}
64 )
65
66 set(SRC
67         intern/BME_Customdata.c
68         intern/BME_conversions.c
69         intern/BME_eulers.c
70         intern/BME_mesh.c
71         intern/BME_structure.c
72         intern/BME_tools.c
73         intern/CCGSubSurf.c
74         intern/DerivedMesh.c
75         intern/action.c
76         intern/anim.c
77         intern/anim_sys.c
78         intern/armature.c
79         intern/blender.c
80         intern/bmfont.c
81         intern/boids.c
82         intern/booleanops_mesh.c
83         intern/brush.c
84         intern/bullet.c
85         intern/bvhutils.c
86         intern/cdderivedmesh.c
87         intern/cloth.c
88         intern/collision.c
89         intern/colortools.c
90         intern/constraint.c
91         intern/context.c
92         intern/curve.c
93         intern/customdata.c
94         intern/customdata_file.c
95         intern/deform.c
96         intern/depsgraph.c
97         intern/displist.c
98         intern/effect.c
99         intern/editderivedbmesh.c
100         intern/fcurve.c
101         intern/fluidsim.c
102         intern/fmodifier.c
103         intern/font.c
104         intern/gpencil.c
105         intern/group.c
106         intern/icons.c
107         intern/idcode.c
108         intern/idprop.c
109         intern/image.c
110         intern/image_gen.c
111         intern/implicit.c
112         intern/ipo.c
113         intern/key.c
114         intern/lattice.c
115         intern/library.c
116         intern/material.c
117         intern/mball.c
118         intern/mesh.c
119         intern/mesh_validate.c
120         intern/modifier.c
121         intern/modifiers_bmesh.c
122         intern/multires.c
123         intern/nla.c
124         intern/node.c
125         intern/object.c
126         intern/packedFile.c
127         intern/paint.c
128         intern/particle.c
129         intern/particle_system.c
130         intern/pointcache.c
131         intern/property.c
132         intern/report.c
133         intern/sca.c
134         intern/scene.c
135         intern/screen.c
136         intern/script.c
137         intern/seqcache.c
138         intern/seqeffects.c
139         intern/sequencer.c
140         intern/shrinkwrap.c
141         intern/sketch.c
142         intern/smoke.c
143         intern/softbody.c
144         intern/sound.c
145         intern/subsurf_ccg.c
146         intern/suggestions.c
147         intern/text.c
148         intern/texture.c
149         intern/unit.c
150         intern/world.c
151         intern/writeavi.c
152         intern/writeffmpeg.c
153         intern/writeframeserver.c
154         
155         BKE_DerivedMesh.h
156         BKE_action.h
157         BKE_anim.h
158         BKE_animsys.h
159         BKE_armature.h
160         BKE_array_mallocn.h
161         BKE_blender.h
162         BKE_bmesh.h
163         BKE_bmeshCustomData.h
164         BKE_bmfont.h
165         BKE_bmfont_types.h
166         BKE_boids.h
167         BKE_booleanops_mesh.h
168         BKE_brush.h
169         BKE_bullet.h
170         BKE_bvhutils.h
171         BKE_cdderivedmesh.h
172         BKE_cloth.h
173         BKE_collision.h
174         BKE_colortools.h
175         BKE_constraint.h
176         BKE_context.h
177         BKE_curve.h
178         BKE_customdata.h
179         BKE_customdata_file.h
180         BKE_deform.h
181         BKE_depsgraph.h
182         BKE_displist.h
183         BKE_effect.h
184         BKE_endian.h
185         BKE_fcurve.h
186         BKE_fluidsim.h
187         BKE_font.h
188         BKE_global.h
189         BKE_gpencil.h
190         BKE_group.h
191         BKE_icons.h
192         BKE_idcode.h
193         BKE_idprop.h
194         BKE_image.h
195         BKE_ipo.h
196         BKE_key.h
197         BKE_lattice.h
198         BKE_library.h
199         BKE_main.h
200         BKE_material.h
201         BKE_mball.h
202         BKE_mesh.h
203         BKE_modifier.h
204         BKE_multires.h
205         BKE_nla.h
206         BKE_node.h
207         BKE_object.h
208         BKE_packedFile.h
209         BKE_paint.h
210         BKE_particle.h
211         BKE_plugin_types.h
212         BKE_pointcache.h
213         BKE_property.h
214         BKE_report.h
215         BKE_sca.h
216         BKE_scene.h
217         BKE_screen.h
218         BKE_script.h
219         BKE_sequencer.h
220         BKE_shrinkwrap.h
221         BKE_sketch.h
222         BKE_smoke.h
223         BKE_softbody.h
224         BKE_sound.h
225         BKE_subsurf.h
226         BKE_suggestions.h
227         BKE_text.h
228         BKE_texture.h
229         BKE_unit.h
230         BKE_utildefines.h
231         BKE_world.h
232         BKE_writeavi.h
233         BKE_writeffmpeg.h
234         BKE_writeframeserver.h
235         depsgraph_private.h
236         intern/CCGSubSurf.h
237         intern/bmesh_private.h
238         nla_private.h
239 )
240
241 add_definitions(-DGLEW_STATIC)
242
243 if(WITH_BULLET)
244         list(APPEND INC ../../../extern/bullet2/src)
245         add_definitions(-DUSE_BULLET)
246 endif()
247
248 if(WITH_MOD_CLOTH_ELTOPO)
249         list(APPEND INC ../../../extern/eltopo)
250         add_definitions(-DWITH_ELTOPO)
251 endif()
252
253 if(WITH_IMAGE_OPENEXR)
254         add_definitions(-DWITH_OPENEXR)
255 endif()
256
257 if(WITH_IMAGE_TIFF)
258         add_definitions(-DWITH_TIFF)
259 endif()
260
261 if(WITH_IMAGE_OPENJPEG)
262         add_definitions(-DWITH_OPENJPEG)
263 endif()
264
265 if(WITH_IMAGE_DDS)
266         add_definitions(-DWITH_DDS)
267 endif()
268
269 if(WITH_IMAGE_CINEON)
270         add_definitions(-DWITH_CINEON)
271 endif()
272
273 if(WITH_IMAGE_HDR)
274         add_definitions(-DWITH_HDR)
275 endif()
276
277 if(WITH_CODEC_QUICKTIME)
278         list(APPEND INC ../quicktime)
279         list(APPEND INC_SYS ${QUICKTIME_INC})
280         add_definitions(-DWITH_QUICKTIME)
281 endif()
282
283 if(WITH_CODEC_FFMPEG)
284         list(APPEND INC_SYS ${FFMPEG_INC})
285         add_definitions(-DWITH_FFMPEG)
286 endif()
287
288 if(WITH_PYTHON)
289         list(APPEND INC ../python)
290         list(APPEND INC_SYS ${PYTHON_INCLUDE_DIRS})
291         add_definitions(-DWITH_PYTHON)
292
293         if(WITH_PYTHON_SECURITY)
294                 add_definitions(-DWITH_PYTHON_SECURITY)
295         endif()
296 endif()
297
298 if(WITH_OPENMP)
299         add_definitions(-DPARALLEL=1)
300 endif()
301
302 if(NOT WITH_MOD_FLUID)
303         add_definitions(-DDISABLE_ELBEEM)
304 endif()
305
306 if(WITH_JACK)
307         add_definitions(-DWITH_JACK)
308 endif()
309
310 if(WITH_LZO)
311         list(APPEND INC_SYS ../../../extern/lzo/minilzo)
312         add_definitions(-DWITH_LZO)
313 endif()
314
315 if(WITH_LZMA)
316         list(APPEND INC_SYS ../../../extern/lzma)
317         add_definitions(-DWITH_LZMA)
318 endif()
319
320 if(MSVC)
321         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
322 endif()
323
324 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")