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