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