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