Removed remaining use of pointers to particle types as well as boids headers.
[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         ../blentranslation
32         ../depsgraph
33         ../gpu
34         ../ikplugin
35         ../imbuf
36         ../makesdna
37         ../makesrna
38         ../bmesh
39         ../modifiers
40         ../nodes
41         ../physics
42         ../render/extern/include
43         ../../../intern/ghost
44         ../../../intern/guardedalloc
45         ../../../intern/glew-mx
46         ../../../intern/iksolver/extern
47         ../../../intern/memutil
48         ../../../intern/mikktspace
49         ../../../intern/smoke/extern
50         ../../../intern/atomic
51         ../../../intern/libmv
52
53         # XXX - BAD LEVEL CALL WM_api.h
54         ../windowmanager
55 )
56
57 set(INC_SYS
58         ${GLEW_INCLUDE_PATH}
59         ${ZLIB_INCLUDE_DIRS}
60 )
61
62 set(SRC
63         intern/CCGSubSurf.c
64         intern/CCGSubSurf_legacy.c
65         intern/CCGSubSurf_opensubdiv.c
66         intern/CCGSubSurf_opensubdiv_converter.c
67         intern/CCGSubSurf_util.c
68         intern/DerivedMesh.c
69         intern/action.c
70         intern/addon.c
71         intern/anim.c
72         intern/anim_sys.c
73         intern/appdir.c
74         intern/armature.c
75         intern/armature_update.c
76         intern/autoexec.c
77         intern/blender.c
78         intern/bmfont.c
79         intern/bpath.c
80         intern/brush.c
81         intern/bullet.c
82         intern/bvhutils.c
83         intern/camera.c
84         intern/cdderivedmesh.c
85         intern/cloth.c
86         intern/collision.c
87         intern/colortools.c
88         intern/constraint.c
89         intern/context.c
90         intern/crazyspace.c
91         intern/curve.c
92         intern/customdata.c
93         intern/customdata_file.c
94         intern/data_transfer.c
95         intern/deform.c
96         intern/depsgraph.c
97         intern/displist.c
98         intern/dynamicpaint.c
99         intern/editderivedmesh.c
100         intern/editmesh.c
101         intern/editmesh_bvh.c
102         intern/effect.c
103         intern/fcurve.c
104         intern/fluidsim.c
105         intern/fmodifier.c
106         intern/font.c
107         intern/freestyle.c
108         intern/gpencil.c
109         intern/group.c
110         intern/icons.c
111         intern/idcode.c
112         intern/idprop.c
113         intern/image.c
114         intern/image_gen.c
115         intern/ipo.c
116         intern/key.c
117         intern/lamp.c
118         intern/lattice.c
119         intern/library.c
120         intern/library_query.c
121         intern/linestyle.c
122         intern/mask.c
123         intern/mask_evaluate.c
124         intern/mask_rasterize.c
125         intern/material.c
126         intern/mball.c
127         intern/mball_tessellate.c
128         intern/mesh.c
129         intern/mesh_evaluate.c
130         intern/mesh_mapping.c
131         intern/mesh_remap.c
132         intern/mesh_validate.c
133         intern/modifier.c
134         intern/modifiers_bmesh.c
135         intern/movieclip.c
136         intern/multires.c
137         intern/nla.c
138         intern/node.c
139         intern/object.c
140         intern/object_deform.c
141         intern/object_dupli.c
142         intern/object_update.c
143         intern/ocean.c
144         intern/outliner_treehash.c
145         intern/packedFile.c
146         intern/paint.c
147         intern/pbvh.c
148         intern/pbvh_bmesh.c
149         intern/pointcache.c
150         intern/property.c
151         intern/report.c
152         intern/rigidbody.c
153         intern/sca.c
154         intern/scene.c
155         intern/screen.c
156         intern/seqcache.c
157         intern/seqeffects.c
158         intern/seqmodifier.c
159         intern/sequencer.c
160         intern/shrinkwrap.c
161         intern/sketch.c
162         intern/smoke.c
163         intern/softbody.c
164         intern/sound.c
165         intern/speaker.c
166         intern/subsurf_ccg.c
167         intern/suggestions.c
168         intern/text.c
169         intern/texture.c
170         intern/tracking.c
171         intern/tracking_auto.c
172         intern/tracking_detect.c
173         intern/tracking_plane_tracker.c
174         intern/tracking_region_tracker.c
175         intern/tracking_solver.c
176         intern/tracking_stabilize.c
177         intern/tracking_util.c
178         intern/unit.c
179         intern/world.c
180         intern/writeavi.c
181         intern/writeframeserver.c
182
183         BKE_DerivedMesh.h
184         BKE_action.h
185         BKE_addon.h
186         BKE_anim.h
187         BKE_animsys.h
188         BKE_appdir.h
189         BKE_armature.h
190         BKE_autoexec.h
191         BKE_blender.h
192         BKE_bmfont.h
193         BKE_bmfont_types.h
194         BKE_bpath.h
195         BKE_brush.h
196         BKE_bullet.h
197         BKE_bvhutils.h
198         BKE_camera.h
199         BKE_ccg.h
200         BKE_cdderivedmesh.h
201         BKE_cloth.h
202         BKE_collision.h
203         BKE_colortools.h
204         BKE_constraint.h
205         BKE_context.h
206         BKE_crazyspace.h
207         BKE_curve.h
208         BKE_customdata.h
209         BKE_customdata_file.h
210         BKE_data_transfer.h
211         BKE_deform.h
212         BKE_depsgraph.h
213         BKE_displist.h
214         BKE_dynamicpaint.h
215         BKE_editmesh.h
216         BKE_editmesh_bvh.h
217         BKE_effect.h
218         BKE_fcurve.h
219         BKE_fluidsim.h
220         BKE_font.h
221         BKE_freestyle.h
222         BKE_global.h
223         BKE_gpencil.h
224         BKE_group.h
225         BKE_icons.h
226         BKE_idcode.h
227         BKE_idprop.h
228         BKE_image.h
229         BKE_ipo.h
230         BKE_key.h
231         BKE_lamp.h
232         BKE_lattice.h
233         BKE_library.h
234         BKE_library_query.h
235         BKE_linestyle.h
236         BKE_main.h
237         BKE_mask.h
238         BKE_material.h
239         BKE_mball.h
240         BKE_mball_tessellate.h
241         BKE_mesh.h
242         BKE_mesh_mapping.h
243         BKE_mesh_remap.h
244         BKE_modifier.h
245         BKE_movieclip.h
246         BKE_multires.h
247         BKE_nla.h
248         BKE_node.h
249         BKE_object.h
250         BKE_object_deform.h
251         BKE_ocean.h
252         BKE_outliner_treehash.h
253         BKE_packedFile.h
254         BKE_paint.h
255         BKE_pbvh.h
256         BKE_pointcache.h
257         BKE_property.h
258         BKE_report.h
259         BKE_rigidbody.h
260         BKE_sca.h
261         BKE_scene.h
262         BKE_screen.h
263         BKE_sequencer.h
264         BKE_shrinkwrap.h
265         BKE_sketch.h
266         BKE_smoke.h
267         BKE_softbody.h
268         BKE_sound.h
269         BKE_speaker.h
270         BKE_subsurf.h
271         BKE_suggestions.h
272         BKE_text.h
273         BKE_texture.h
274         BKE_tracking.h
275         BKE_unit.h
276         BKE_utildefines.h
277         BKE_world.h
278         BKE_writeavi.h
279         BKE_writeframeserver.h
280
281         depsgraph_private.h
282         nla_private.h
283         tracking_private.h
284         intern/CCGSubSurf.h
285         intern/CCGSubSurf_inline.h
286         intern/CCGSubSurf_intern.h
287         intern/pbvh_intern.h
288         intern/data_transfer_intern.h
289 )
290
291 if(WITH_BINRELOC)
292         list(APPEND INC_SYS
293                 ${BINRELOC_INCLUDE_DIRS}
294         )
295         add_definitions(-DWITH_BINRELOC)
296 endif()
297
298 add_definitions(${GL_DEFINITIONS})
299
300 if(WIN32)
301         list(APPEND INC
302                 ../../../intern/utfconv
303         )
304 endif()
305
306 if(WITH_AUDASPACE)
307         add_definitions(${AUDASPACE_DEFINITIONS})
308
309         list(APPEND INC_SYS
310                 ${AUDASPACE_C_INCLUDE_DIRS}
311         )
312 endif()
313
314 if(WITH_BULLET)
315         list(APPEND INC_SYS
316                 ${BULLET_INCLUDE_DIRS}
317         )
318         list(APPEND INC
319                 ../../../intern/rigidbody
320         )
321         add_definitions(-DWITH_BULLET)
322 endif()
323
324 #if(WITH_MOD_CLOTH_ELTOPO)
325 #       list(APPEND INC
326 #               ../../../extern/eltopo
327 #               ../../../extern/eltopo/eltopo3d
328 #       )
329 #       add_definitions(-DWITH_ELTOPO)
330 #endif()
331
332 if(WITH_IMAGE_OPENEXR)
333         add_definitions(-DWITH_OPENEXR)
334 endif()
335
336 if(WITH_IMAGE_TIFF)
337         add_definitions(-DWITH_TIFF)
338 endif()
339
340 if(WITH_OPENIMAGEIO)
341         add_definitions(-DWITH_OPENIMAGEIO)
342 endif()
343
344 if(WITH_IMAGE_OPENJPEG)
345         add_definitions(-DWITH_OPENJPEG)
346 endif()
347
348 if(WITH_IMAGE_DDS)
349         add_definitions(-DWITH_DDS)
350 endif()
351
352 if(WITH_IMAGE_CINEON)
353         add_definitions(-DWITH_CINEON)
354 endif()
355
356 if(WITH_IMAGE_FRAMESERVER)
357         add_definitions(-DWITH_FRAMESERVER)
358 endif()
359
360 if(WITH_IMAGE_HDR)
361         add_definitions(-DWITH_HDR)
362 endif()
363
364 if(WITH_CODEC_AVI)
365         list(APPEND INC
366                 ../avi
367         )
368         add_definitions(-DWITH_AVI)
369 endif()
370
371 if(WITH_CODEC_QUICKTIME)
372         list(APPEND INC
373                 ../quicktime
374         )
375         list(APPEND INC_SYS
376                 ${QUICKTIME_INCLUDE_DIRS}
377         )
378         add_definitions(-DWITH_QUICKTIME)
379 endif()
380
381 if(WITH_CODEC_FFMPEG)
382         list(APPEND SRC
383                 intern/writeffmpeg.c
384                 BKE_writeffmpeg.h
385         )
386         list(APPEND INC
387                 ../../../intern/ffmpeg
388         )
389         list(APPEND INC_SYS
390                 ${FFMPEG_INCLUDE_DIRS}
391         )
392         add_definitions(-DWITH_FFMPEG)
393
394         remove_strict_flags_file(
395                 intern/writeffmpeg.c
396         )
397 endif()
398
399 if(WITH_PYTHON)
400         list(APPEND INC
401                 ../python
402         )
403         add_definitions(-DWITH_PYTHON)
404
405         if(WITH_PYTHON_SECURITY)
406                 add_definitions(-DWITH_PYTHON_SECURITY)
407         endif()
408
409
410         if (PYTHON_EXECUTABLE)
411                 get_filename_component(_python_exe_name ${PYTHON_EXECUTABLE} NAME)
412                 add_definitions(-DPYTHON_EXECUTABLE_NAME=${_python_exe_name})
413                 unset(_python_exe_name)
414         endif()
415 endif()
416
417 if(WITH_MOD_FLUID)
418         list(APPEND INC
419                 ../../../intern/elbeem/extern
420         )
421         add_definitions(-DWITH_MOD_FLUID)
422 endif()
423
424 if(WITH_MOD_SMOKE)
425         add_definitions(-DWITH_SMOKE)
426 endif()
427
428 if(WITH_MOD_OCEANSIM)
429         add_definitions(-DWITH_OCEANSIM)
430 endif()
431
432 if(WITH_JACK)
433         add_definitions(-DWITH_JACK)
434 endif()
435
436 if(WITH_LZO)
437         if(WITH_SYSTEM_LZO)
438                 list(APPEND INC_SYS
439                         ${LZO_INCLUDE_DIR}
440                 )
441                 add_definitions(-DWITH_SYSTEM_LZO)
442         else()
443                 list(APPEND INC_SYS
444                         ../../../extern/lzo/minilzo
445                 )
446         endif()
447         add_definitions(-DWITH_LZO)
448 endif()
449
450 if(WITH_LZMA)
451         list(APPEND INC_SYS
452                 ../../../extern/lzma
453         )
454         add_definitions(-DWITH_LZMA)
455 endif()
456
457 if(WITH_GAMEENGINE)
458         list(APPEND INC_SYS
459                 ../../../extern/recastnavigation
460         )
461         list(APPEND SRC
462                 intern/navmesh_conversion.c
463                 BKE_navmesh_conversion.h
464         )
465
466         add_definitions(-DWITH_GAMEENGINE)
467 endif()
468
469 if(WITH_LIBMV)
470         add_definitions(-DWITH_LIBMV)
471 endif()
472
473 if(WITH_FFTW3)
474         list(APPEND INC_SYS
475                 ${FFTW3_INCLUDE_DIRS}
476         )
477         add_definitions(-DFFTW3=1)
478 endif()
479
480 if(WITH_INTERNATIONAL)
481         add_definitions(-DWITH_INTERNATIONAL)
482 endif()
483
484 if(WITH_FREESTYLE)
485         add_definitions(-DWITH_FREESTYLE)
486 endif()
487
488 if(WITH_OPENSUBDIV)
489         add_definitions(-DWITH_OPENSUBDIV)
490         list(APPEND INC_SYS
491                 ../../../intern/opensubdiv
492                 ${OPENSUBDIV_INCLUDE_DIRS}
493         )
494 endif()
495
496 if(WITH_OPENVDB)
497         add_definitions(-DWITH_OPENVDB)
498         list(APPEND INC
499                  ../../../intern/openvdb
500         )
501
502         if(WITH_OPENVDB_BLOSC)
503                 add_definitions(
504                         -DWITH_OPENVDB_BLOSC
505                 )
506         endif()
507 endif()
508
509 ## Warnings as errors, this is too strict!
510 #if(MSVC)
511 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
512 #endif()
513
514 if(WITH_LEGACY_DEPSGRAPH)
515         add_definitions(-DWITH_LEGACY_DEPSGRAPH)
516 endif()
517
518 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")