ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).
[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         # XXX - BAD LEVEL CALL WM_api.h
54         ../windowmanager
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/bullet.c
86         intern/bvhutils.c
87         intern/camera.c
88         intern/cdderivedmesh.c
89         intern/cloth.c
90         intern/collision.c
91         intern/colortools.c
92         intern/constraint.c
93         intern/context.c
94         intern/crazyspace.c
95         intern/curve.c
96         intern/customdata.c
97         intern/customdata_file.c
98         intern/data_transfer.c
99         intern/deform.c
100         intern/depsgraph.c
101         intern/displist.c
102         intern/dynamicpaint.c
103         intern/editderivedmesh.c
104         intern/editmesh.c
105         intern/editmesh_bvh.c
106         intern/effect.c
107         intern/fcurve.c
108         intern/fluidsim.c
109         intern/fmodifier.c
110         intern/font.c
111         intern/freestyle.c
112         intern/gpencil.c
113         intern/group.c
114         intern/icons.c
115         intern/idcode.c
116         intern/idprop.c
117         intern/image.c
118         intern/image_gen.c
119         intern/ipo.c
120         intern/key.c
121         intern/lamp.c
122         intern/lattice.c
123         intern/library.c
124         intern/library_idmap.c
125         intern/library_query.c
126         intern/library_remap.c
127         intern/linestyle.c
128         intern/mask.c
129         intern/mask_evaluate.c
130         intern/mask_rasterize.c
131         intern/material.c
132         intern/mball.c
133         intern/mball_tessellate.c
134         intern/mesh.c
135         intern/mesh_evaluate.c
136         intern/mesh_mapping.c
137         intern/mesh_remap.c
138         intern/mesh_validate.c
139         intern/modifier.c
140         intern/modifiers_bmesh.c
141         intern/movieclip.c
142         intern/multires.c
143         intern/nla.c
144         intern/node.c
145         intern/object.c
146         intern/object_deform.c
147         intern/object_dupli.c
148         intern/object_update.c
149         intern/ocean.c
150         intern/outliner_treehash.c
151         intern/packedFile.c
152         intern/paint.c
153         intern/particle.c
154         intern/particle_child.c
155         intern/particle_distribute.c
156         intern/particle_system.c
157         intern/pbvh.c
158         intern/pbvh_bmesh.c
159         intern/pointcache.c
160         intern/property.c
161         intern/report.c
162         intern/rigidbody.c
163         intern/sca.c
164         intern/scene.c
165         intern/screen.c
166         intern/seqcache.c
167         intern/seqeffects.c
168         intern/seqmodifier.c
169         intern/sequencer.c
170         intern/shrinkwrap.c
171         intern/sketch.c
172         intern/smoke.c
173         intern/softbody.c
174         intern/sound.c
175         intern/speaker.c
176         intern/subsurf_ccg.c
177         intern/suggestions.c
178         intern/text.c
179         intern/texture.c
180         intern/tracking.c
181         intern/tracking_auto.c
182         intern/tracking_detect.c
183         intern/tracking_plane_tracker.c
184         intern/tracking_region_tracker.c
185         intern/tracking_solver.c
186         intern/tracking_stabilize.c
187         intern/tracking_util.c
188         intern/unit.c
189         intern/world.c
190         intern/writeavi.c
191         intern/writeframeserver.c
192
193         BKE_DerivedMesh.h
194         BKE_action.h
195         BKE_addon.h
196         BKE_anim.h
197         BKE_animsys.h
198         BKE_appdir.h
199         BKE_armature.h
200         BKE_autoexec.h
201         BKE_blender.h
202         BKE_blender_copybuffer.h
203         BKE_blender_undo.h
204         BKE_blender_version.h
205         BKE_blendfile.h
206         BKE_bmfont.h
207         BKE_bmfont_types.h
208         BKE_boids.h
209         BKE_bpath.h
210         BKE_brush.h
211         BKE_bullet.h
212         BKE_bvhutils.h
213         BKE_camera.h
214         BKE_ccg.h
215         BKE_cdderivedmesh.h
216         BKE_cloth.h
217         BKE_collision.h
218         BKE_colortools.h
219         BKE_constraint.h
220         BKE_context.h
221         BKE_crazyspace.h
222         BKE_curve.h
223         BKE_customdata.h
224         BKE_customdata_file.h
225         BKE_data_transfer.h
226         BKE_deform.h
227         BKE_depsgraph.h
228         BKE_displist.h
229         BKE_dynamicpaint.h
230         BKE_editmesh.h
231         BKE_editmesh_bvh.h
232         BKE_effect.h
233         BKE_fcurve.h
234         BKE_fluidsim.h
235         BKE_font.h
236         BKE_freestyle.h
237         BKE_global.h
238         BKE_gpencil.h
239         BKE_group.h
240         BKE_icons.h
241         BKE_idcode.h
242         BKE_idprop.h
243         BKE_image.h
244         BKE_ipo.h
245         BKE_key.h
246         BKE_lamp.h
247         BKE_lattice.h
248         BKE_library.h
249         BKE_library_idmap.h
250         BKE_library_query.h
251         BKE_library_remap.h
252         BKE_linestyle.h
253         BKE_main.h
254         BKE_mask.h
255         BKE_material.h
256         BKE_mball.h
257         BKE_mball_tessellate.h
258         BKE_mesh.h
259         BKE_mesh_mapping.h
260         BKE_mesh_remap.h
261         BKE_modifier.h
262         BKE_movieclip.h
263         BKE_multires.h
264         BKE_nla.h
265         BKE_node.h
266         BKE_object.h
267         BKE_object_deform.h
268         BKE_ocean.h
269         BKE_outliner_treehash.h
270         BKE_packedFile.h
271         BKE_paint.h
272         BKE_particle.h
273         BKE_pbvh.h
274         BKE_pointcache.h
275         BKE_property.h
276         BKE_report.h
277         BKE_rigidbody.h
278         BKE_sca.h
279         BKE_scene.h
280         BKE_screen.h
281         BKE_sequencer.h
282         BKE_shrinkwrap.h
283         BKE_sketch.h
284         BKE_smoke.h
285         BKE_softbody.h
286         BKE_sound.h
287         BKE_speaker.h
288         BKE_subsurf.h
289         BKE_suggestions.h
290         BKE_text.h
291         BKE_texture.h
292         BKE_tracking.h
293         BKE_unit.h
294         BKE_utildefines.h
295         BKE_world.h
296         BKE_writeavi.h
297         BKE_writeframeserver.h
298
299         depsgraph_private.h
300         nla_private.h
301         tracking_private.h
302         intern/CCGSubSurf.h
303         intern/CCGSubSurf_inline.h
304         intern/CCGSubSurf_intern.h
305         intern/pbvh_intern.h
306         intern/data_transfer_intern.h
307 )
308
309 if(WITH_BINRELOC)
310         list(APPEND INC_SYS
311                 ${BINRELOC_INCLUDE_DIRS}
312         )
313         add_definitions(-DWITH_BINRELOC)
314 endif()
315
316 add_definitions(${GL_DEFINITIONS})
317
318 if(WIN32)
319         list(APPEND INC
320                 ../../../intern/utfconv
321         )
322 endif()
323
324 if(WITH_AUDASPACE)
325         add_definitions(${AUDASPACE_DEFINITIONS})
326
327         list(APPEND INC_SYS
328                 ${AUDASPACE_C_INCLUDE_DIRS}
329         )
330 endif()
331
332 if(WITH_BULLET)
333         list(APPEND INC_SYS
334                 ${BULLET_INCLUDE_DIRS}
335         )
336         list(APPEND INC
337                 ../../../intern/rigidbody
338         )
339         add_definitions(-DWITH_BULLET)
340 endif()
341
342 #if(WITH_MOD_CLOTH_ELTOPO)
343 #       list(APPEND INC
344 #               ../../../extern/eltopo
345 #               ../../../extern/eltopo/eltopo3d
346 #       )
347 #       add_definitions(-DWITH_ELTOPO)
348 #endif()
349
350 if(WITH_IMAGE_OPENEXR)
351         add_definitions(-DWITH_OPENEXR)
352 endif()
353
354 if(WITH_IMAGE_TIFF)
355         add_definitions(-DWITH_TIFF)
356 endif()
357
358 if(WITH_OPENIMAGEIO)
359         add_definitions(-DWITH_OPENIMAGEIO)
360 endif()
361
362 if(WITH_IMAGE_OPENJPEG)
363         add_definitions(-DWITH_OPENJPEG)
364 endif()
365
366 if(WITH_IMAGE_DDS)
367         add_definitions(-DWITH_DDS)
368 endif()
369
370 if(WITH_IMAGE_CINEON)
371         add_definitions(-DWITH_CINEON)
372 endif()
373
374 if(WITH_IMAGE_FRAMESERVER)
375         add_definitions(-DWITH_FRAMESERVER)
376 endif()
377
378 if(WITH_IMAGE_HDR)
379         add_definitions(-DWITH_HDR)
380 endif()
381
382 if(WITH_CODEC_AVI)
383         list(APPEND INC
384                 ../avi
385         )
386         add_definitions(-DWITH_AVI)
387 endif()
388
389 if(WITH_CODEC_QUICKTIME)
390         list(APPEND INC
391                 ../quicktime
392         )
393         list(APPEND INC_SYS
394                 ${QUICKTIME_INCLUDE_DIRS}
395         )
396         add_definitions(-DWITH_QUICKTIME)
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_OPENSUBDIV)
507         add_definitions(-DWITH_OPENSUBDIV)
508         list(APPEND INC_SYS
509                 ../../../intern/opensubdiv
510                 ${OPENSUBDIV_INCLUDE_DIRS}
511         )
512 endif()
513
514 if(WITH_OPENVDB)
515         add_definitions(-DWITH_OPENVDB)
516         list(APPEND INC
517                  ../../../intern/openvdb
518         )
519
520         if(WITH_OPENVDB_BLOSC)
521                 add_definitions(
522                         -DWITH_OPENVDB_BLOSC
523                 )
524         endif()
525 endif()
526
527 ## Warnings as errors, this is too strict!
528 #if(MSVC)
529 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
530 #endif()
531
532 if(WITH_LEGACY_DEPSGRAPH)
533         add_definitions(-DWITH_LEGACY_DEPSGRAPH)
534 endif()
535
536 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")