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