Merging r59182 through r59257 from trunk into soc-2013-depsgraph_mt
[blender.git] / source / blender / blenkernel / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 set(INC
27         .
28         ../blenfont
29         ../blenlib
30         ../blenloader
31         ../gpu
32         ../ikplugin
33         ../imbuf
34         ../makesdna
35         ../makesrna
36         ../bmesh
37         ../modifiers
38         ../nodes
39         ../render/extern/include
40         ../../../intern/guardedalloc
41         ../../../intern/iksolver/extern
42         ../../../intern/memutil
43         ../../../intern/mikktspace
44         ../../../intern/opennl/extern
45         ../../../intern/raskter
46         ../../../intern/smoke/extern
47         ../../../extern/libmv
48         ../../../intern/atomic
49
50         # XXX - BAD LEVEL CALL WM_api.h
51         ../windowmanager
52 )
53
54 set(INC_SYS
55         ${GLEW_INCLUDE_PATH}
56         ${ZLIB_INCLUDE_DIRS}
57 )
58
59 set(SRC
60         intern/CCGSubSurf.c
61         intern/DerivedMesh.c
62         intern/action.c
63         intern/addon.c
64         intern/anim.c
65         intern/anim_sys.c
66         intern/armature.c
67         intern/autoexec.c
68         intern/blender.c
69         intern/bmfont.c
70         intern/boids.c
71         intern/bpath.c
72         intern/brush.c
73         intern/bullet.c
74         intern/bvhutils.c
75         intern/camera.c
76         intern/cdderivedmesh.c
77         intern/cloth.c
78         intern/collision.c
79         intern/colortools.c
80         intern/constraint.c
81         intern/context.c
82         intern/curve.c
83         intern/customdata.c
84         intern/customdata_file.c
85         intern/deform.c
86         intern/depsgraph.c
87         intern/displist.c
88         intern/dynamicpaint.c
89         intern/editderivedmesh.c
90         intern/editmesh.c
91         intern/editmesh_bvh.c
92         intern/effect.c
93         intern/fcurve.c
94         intern/fluidsim.c
95         intern/fmodifier.c
96         intern/font.c
97         intern/freestyle.c
98         intern/gpencil.c
99         intern/group.c
100         intern/icons.c
101         intern/idcode.c
102         intern/idprop.c
103         intern/image.c
104         intern/image_gen.c
105         intern/implicit.c
106         intern/ipo.c
107         intern/key.c
108         intern/lamp.c
109         intern/lattice.c
110         intern/library.c
111         intern/linestyle.c
112         intern/mask.c
113         intern/mask_evaluate.c
114         intern/mask_rasterize.c
115         intern/material.c
116         intern/mball.c
117         intern/mesh.c
118         intern/mesh_validate.c
119         intern/modifier.c
120         intern/modifiers_bmesh.c
121         intern/movieclip.c
122         intern/multires.c
123         intern/nla.c
124         intern/node.c
125         intern/object.c
126         intern/object_deform.c
127         intern/ocean.c
128         intern/packedFile.c
129         intern/paint.c
130         intern/particle.c
131         intern/particle_system.c
132         intern/pbvh.c
133         intern/pbvh_bmesh.c
134         intern/pointcache.c
135         intern/property.c
136         intern/report.c
137         intern/rigidbody.c
138         intern/sca.c
139         intern/scene.c
140         intern/screen.c
141         intern/seqcache.c
142         intern/seqeffects.c
143         intern/seqmodifier.c
144         intern/sequencer.c
145         intern/shrinkwrap.c
146         intern/sketch.c
147         intern/smoke.c
148         intern/softbody.c
149         intern/sound.c
150         intern/speaker.c
151         intern/subsurf_ccg.c
152         intern/suggestions.c
153         intern/text.c
154         intern/texture.c
155         intern/tracking.c
156         intern/unit.c
157         intern/world.c
158         intern/writeavi.c
159         intern/writeframeserver.c
160
161         BKE_DerivedMesh.h
162         BKE_action.h
163         BKE_addon.h
164         BKE_anim.h
165         BKE_animsys.h
166         BKE_armature.h
167         BKE_autoexec.h
168         BKE_blender.h
169         BKE_bmfont.h
170         BKE_bmfont_types.h
171         BKE_boids.h
172         BKE_bpath.h
173         BKE_brush.h
174         BKE_bullet.h
175         BKE_bvhutils.h
176         BKE_camera.h
177         BKE_ccg.h
178         BKE_cdderivedmesh.h
179         BKE_cloth.h
180         BKE_collision.h
181         BKE_colortools.h
182         BKE_constraint.h
183         BKE_context.h
184         BKE_curve.h
185         BKE_customdata.h
186         BKE_customdata_file.h
187         BKE_deform.h
188         BKE_depsgraph.h
189         BKE_displist.h
190         BKE_dynamicpaint.h
191         BKE_effect.h
192         BKE_fcurve.h
193         BKE_fluidsim.h
194         BKE_font.h
195         BKE_freestyle.h
196         BKE_global.h
197         BKE_gpencil.h
198         BKE_group.h
199         BKE_icons.h
200         BKE_idcode.h
201         BKE_idprop.h
202         BKE_image.h
203         BKE_ipo.h
204         BKE_key.h
205         BKE_lamp.h
206         BKE_lattice.h
207         BKE_library.h
208         BKE_linestyle.h
209         BKE_main.h
210         BKE_mask.h
211         BKE_material.h
212         BKE_mball.h
213         BKE_mesh.h
214         BKE_modifier.h
215         BKE_movieclip.h
216         BKE_multires.h
217         BKE_nla.h
218         BKE_node.h
219         BKE_object.h
220         BKE_object_deform.h
221         BKE_ocean.h
222         BKE_packedFile.h
223         BKE_paint.h
224         BKE_particle.h
225         BKE_pbvh.h
226         BKE_pointcache.h
227         BKE_property.h
228         BKE_report.h
229         BKE_rigidbody.h
230         BKE_sca.h
231         BKE_scene.h
232         BKE_screen.h
233         BKE_sequencer.h
234         BKE_shrinkwrap.h
235         BKE_sketch.h
236         BKE_smoke.h
237         BKE_softbody.h
238         BKE_sound.h
239         BKE_speaker.h
240         BKE_subsurf.h
241         BKE_suggestions.h
242         BKE_editmesh.h
243         BKE_editmesh_bvh.h
244         BKE_text.h
245         BKE_texture.h
246         BKE_tracking.h
247         BKE_unit.h
248         BKE_utildefines.h
249         BKE_world.h
250         BKE_writeavi.h
251         BKE_writeframeserver.h
252
253         depsgraph_private.h
254         nla_private.h
255         intern/CCGSubSurf.h
256         intern/pbvh_intern.h
257 )
258
259 add_definitions(-DGLEW_STATIC)
260
261 if(WITH_AUDASPACE)
262         list(APPEND INC
263                 ../../../intern/audaspace/intern
264         )
265         add_definitions(-DWITH_AUDASPACE)
266 endif()
267
268 if(WITH_BULLET)
269         list(APPEND INC_SYS
270                 ${BULLET_INCLUDE_DIRS}
271         )
272         list(APPEND INC
273                 ../../../intern/rigidbody
274         )
275         add_definitions(-DWITH_BULLET)
276 endif()
277
278 #if(WITH_MOD_CLOTH_ELTOPO)
279 #       list(APPEND INC
280 #               ../../../extern/eltopo
281 #               ../../../extern/eltopo/eltopo3d
282 #       )
283 #       add_definitions(-DWITH_ELTOPO)
284 #endif()
285
286 if(WITH_IMAGE_OPENEXR)
287         add_definitions(-DWITH_OPENEXR)
288 endif()
289
290 if(WITH_IMAGE_TIFF)
291         add_definitions(-DWITH_TIFF)
292 endif()
293
294 if(WITH_IMAGE_OPENJPEG)
295         add_definitions(-DWITH_OPENJPEG)
296 endif()
297
298 if(WITH_IMAGE_DDS)
299         add_definitions(-DWITH_DDS)
300 endif()
301
302 if(WITH_IMAGE_CINEON)
303         add_definitions(-DWITH_CINEON)
304 endif()
305
306 if(WITH_IMAGE_FRAMESERVER)
307         add_definitions(-DWITH_FRAMESERVER)
308 endif()
309
310 if(WITH_IMAGE_HDR)
311         add_definitions(-DWITH_HDR)
312 endif()
313
314 if(WITH_CODEC_AVI)
315         list(APPEND INC
316                 ../avi
317         )
318         add_definitions(-DWITH_AVI)
319 endif()
320
321 if(WITH_CODEC_QUICKTIME)
322         list(APPEND INC
323                 ../quicktime
324         )
325         list(APPEND INC_SYS
326                 ${QUICKTIME_INCLUDE_DIRS}
327         )
328         add_definitions(-DWITH_QUICKTIME)
329 endif()
330
331 if(WITH_CODEC_FFMPEG)
332         list(APPEND SRC
333                 intern/writeffmpeg.c
334                 BKE_writeffmpeg.h
335         )
336         list(APPEND INC
337                 ../../../intern/ffmpeg
338         )
339         list(APPEND INC_SYS
340                 ${FFMPEG_INCLUDE_DIRS}
341         )
342         add_definitions(-DWITH_FFMPEG)
343
344         remove_strict_flags_file(
345                 intern/writeffmpeg.c
346         )
347 endif()
348
349 if(WITH_PYTHON)
350         list(APPEND INC
351                 ../python
352         )
353         add_definitions(-DWITH_PYTHON)
354
355         if(WITH_PYTHON_SECURITY)
356                 add_definitions(-DWITH_PYTHON_SECURITY)
357         endif()
358 endif()
359
360 if(WITH_MOD_FLUID)
361         list(APPEND INC
362                 ../../../intern/elbeem/extern
363         )
364         add_definitions(-DWITH_MOD_FLUID)
365 endif()
366
367 if(WITH_MOD_SMOKE)
368         add_definitions(-DWITH_SMOKE)
369 endif()
370
371 if(WITH_MOD_OCEANSIM)
372         add_definitions(-DWITH_OCEANSIM)
373 endif()
374
375 if(WITH_MOD_BOOLEAN)
376         list(APPEND INC
377                 ../../../intern/bsp/extern
378         )
379 endif()
380
381 if(WITH_JACK)
382         add_definitions(-DWITH_JACK)
383 endif()
384
385 if(WITH_LZO)
386         list(APPEND INC_SYS
387                 ../../../extern/lzo/minilzo
388         )
389         add_definitions(-DWITH_LZO)
390 endif()
391
392 if(WITH_LZMA)
393         list(APPEND INC_SYS
394                 ../../../extern/lzma
395         )
396         add_definitions(-DWITH_LZMA)
397 endif()
398
399 if(WITH_GAMEENGINE)
400         list(APPEND INC_SYS
401                 ../../../extern/recastnavigation
402         )
403         list(APPEND SRC
404                 intern/navmesh_conversion.c
405                 BKE_navmesh_conversion.h
406         )
407
408         add_definitions(-DWITH_GAMEENGINE)
409 endif()
410
411 if(WITH_LIBMV)
412         add_definitions(-DWITH_LIBMV)
413 endif()
414
415 if(WITH_FFTW3)
416         list(APPEND INC_SYS
417                 ${FFTW3_INCLUDE_DIRS}
418         )
419         add_definitions(-DFFTW3=1)
420 endif()
421
422 if(WITH_INTERNATIONAL)
423         add_definitions(-DWITH_INTERNATIONAL)
424 endif()
425
426 if(WITH_FREESTYLE)
427         add_definitions(-DWITH_FREESTYLE)
428 endif()
429
430 ## Warnings as errors, this is too strict!
431 #if(MSVC)
432 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
433 #endif()
434
435 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")