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