Fix T37599: Crash making linked objects local and undo
[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         ../gpu
32         ../ikplugin
33         ../imbuf
34         ../makesdna
35         ../makesrna
36         ../bmesh
37         ../modifiers
38         ../nodes
39         ../render/extern/include
40         ../../../intern/guardedalloc
41         ../../../intern/iksolver/extern
42         ../../../intern/memutil
43         ../../../intern/mikktspace
44         ../../../intern/raskter
45         ../../../intern/smoke/extern
46         ../../../extern/libmv
47         ../../../intern/atomic
48
49         # XXX - BAD LEVEL CALL WM_api.h
50         ../windowmanager
51 )
52
53 set(INC_SYS
54         ${GLEW_INCLUDE_PATH}
55         ${ZLIB_INCLUDE_DIRS}
56 )
57
58 set(SRC
59         intern/CCGSubSurf.c
60         intern/DerivedMesh.c
61         intern/action.c
62         intern/addon.c
63         intern/anim.c
64         intern/anim_sys.c
65         intern/armature.c
66         intern/autoexec.c
67         intern/blender.c
68         intern/bmfont.c
69         intern/boids.c
70         intern/bpath.c
71         intern/brush.c
72         intern/bullet.c
73         intern/bvhutils.c
74         intern/camera.c
75         intern/cdderivedmesh.c
76         intern/cloth.c
77         intern/collision.c
78         intern/colortools.c
79         intern/constraint.c
80         intern/context.c
81         intern/curve.c
82         intern/customdata.c
83         intern/customdata_file.c
84         intern/deform.c
85         intern/depsgraph.c
86         intern/displist.c
87         intern/dynamicpaint.c
88         intern/editderivedmesh.c
89         intern/editmesh.c
90         intern/editmesh_bvh.c
91         intern/effect.c
92         intern/fcurve.c
93         intern/fluidsim.c
94         intern/fmodifier.c
95         intern/font.c
96         intern/freestyle.c
97         intern/gpencil.c
98         intern/group.c
99         intern/icons.c
100         intern/idcode.c
101         intern/idprop.c
102         intern/image.c
103         intern/image_gen.c
104         intern/implicit.c
105         intern/ipo.c
106         intern/key.c
107         intern/lamp.c
108         intern/lattice.c
109         intern/library.c
110         intern/library_query.c
111         intern/linestyle.c
112         intern/mask.c
113         intern/mask_evaluate.c
114         intern/mask_rasterize.c
115         intern/material.c
116         intern/mball.c
117         intern/mesh.c
118         intern/mesh_evaluate.c
119         intern/mesh_mapping.c
120         intern/mesh_validate.c
121         intern/modifier.c
122         intern/modifiers_bmesh.c
123         intern/movieclip.c
124         intern/multires.c
125         intern/nla.c
126         intern/node.c
127         intern/object.c
128         intern/object_deform.c
129         intern/object_dupli.c
130         intern/ocean.c
131         intern/packedFile.c
132         intern/paint.c
133         intern/particle.c
134         intern/particle_system.c
135         intern/pbvh.c
136         intern/pbvh_bmesh.c
137         intern/pointcache.c
138         intern/property.c
139         intern/report.c
140         intern/rigidbody.c
141         intern/sca.c
142         intern/scene.c
143         intern/screen.c
144         intern/seqcache.c
145         intern/seqeffects.c
146         intern/seqmodifier.c
147         intern/sequencer.c
148         intern/shrinkwrap.c
149         intern/sketch.c
150         intern/smoke.c
151         intern/softbody.c
152         intern/sound.c
153         intern/speaker.c
154         intern/subsurf_ccg.c
155         intern/suggestions.c
156         intern/text.c
157         intern/texture.c
158         intern/tracking.c
159         intern/tracking_detect.c
160         intern/tracking_plane_tracker.c
161         intern/tracking_region_tracker.c
162         intern/tracking_solver.c
163         intern/tracking_stabilize.c
164         intern/tracking_util.c
165         intern/treehash.c
166         intern/unit.c
167         intern/world.c
168         intern/writeavi.c
169         intern/writeframeserver.c
170
171         BKE_DerivedMesh.h
172         BKE_action.h
173         BKE_addon.h
174         BKE_anim.h
175         BKE_animsys.h
176         BKE_armature.h
177         BKE_autoexec.h
178         BKE_blender.h
179         BKE_bmfont.h
180         BKE_bmfont_types.h
181         BKE_boids.h
182         BKE_bpath.h
183         BKE_brush.h
184         BKE_bullet.h
185         BKE_bvhutils.h
186         BKE_camera.h
187         BKE_ccg.h
188         BKE_cdderivedmesh.h
189         BKE_cloth.h
190         BKE_collision.h
191         BKE_colortools.h
192         BKE_constraint.h
193         BKE_context.h
194         BKE_curve.h
195         BKE_customdata.h
196         BKE_customdata_file.h
197         BKE_deform.h
198         BKE_depsgraph.h
199         BKE_displist.h
200         BKE_dynamicpaint.h
201         BKE_effect.h
202         BKE_fcurve.h
203         BKE_fluidsim.h
204         BKE_font.h
205         BKE_freestyle.h
206         BKE_global.h
207         BKE_gpencil.h
208         BKE_group.h
209         BKE_icons.h
210         BKE_idcode.h
211         BKE_idprop.h
212         BKE_image.h
213         BKE_ipo.h
214         BKE_key.h
215         BKE_lamp.h
216         BKE_lattice.h
217         BKE_library.h
218         BKE_library_query.h
219         BKE_linestyle.h
220         BKE_main.h
221         BKE_mask.h
222         BKE_material.h
223         BKE_mball.h
224         BKE_mesh.h
225         BKE_mesh_mapping.h
226         BKE_modifier.h
227         BKE_movieclip.h
228         BKE_multires.h
229         BKE_nla.h
230         BKE_node.h
231         BKE_object.h
232         BKE_object_deform.h
233         BKE_ocean.h
234         BKE_packedFile.h
235         BKE_paint.h
236         BKE_particle.h
237         BKE_pbvh.h
238         BKE_pointcache.h
239         BKE_property.h
240         BKE_report.h
241         BKE_rigidbody.h
242         BKE_sca.h
243         BKE_scene.h
244         BKE_screen.h
245         BKE_sequencer.h
246         BKE_shrinkwrap.h
247         BKE_sketch.h
248         BKE_smoke.h
249         BKE_softbody.h
250         BKE_sound.h
251         BKE_speaker.h
252         BKE_subsurf.h
253         BKE_suggestions.h
254         BKE_editmesh.h
255         BKE_editmesh_bvh.h
256         BKE_text.h
257         BKE_texture.h
258         BKE_tracking.h
259         BKE_treehash.h
260         BKE_unit.h
261         BKE_utildefines.h
262         BKE_world.h
263         BKE_writeavi.h
264         BKE_writeframeserver.h
265
266         depsgraph_private.h
267         nla_private.h
268         tracking_private.h
269         intern/CCGSubSurf.h
270         intern/pbvh_intern.h
271 )
272
273 add_definitions(-DGLEW_STATIC)
274
275 if(WITH_AUDASPACE)
276         list(APPEND INC
277                 ../../../intern/audaspace/intern
278         )
279         add_definitions(-DWITH_AUDASPACE)
280 endif()
281
282 if(WITH_BULLET)
283         list(APPEND INC_SYS
284                 ${BULLET_INCLUDE_DIRS}
285         )
286         list(APPEND INC
287                 ../../../intern/rigidbody
288         )
289         add_definitions(-DWITH_BULLET)
290 endif()
291
292 #if(WITH_MOD_CLOTH_ELTOPO)
293 #       list(APPEND INC
294 #               ../../../extern/eltopo
295 #               ../../../extern/eltopo/eltopo3d
296 #       )
297 #       add_definitions(-DWITH_ELTOPO)
298 #endif()
299
300 if(WITH_IMAGE_OPENEXR)
301         add_definitions(-DWITH_OPENEXR)
302 endif()
303
304 if(WITH_IMAGE_TIFF)
305         add_definitions(-DWITH_TIFF)
306 endif()
307
308 if(WITH_IMAGE_OPENJPEG)
309         add_definitions(-DWITH_OPENJPEG)
310 endif()
311
312 if(WITH_IMAGE_DDS)
313         add_definitions(-DWITH_DDS)
314 endif()
315
316 if(WITH_IMAGE_CINEON)
317         add_definitions(-DWITH_CINEON)
318 endif()
319
320 if(WITH_IMAGE_FRAMESERVER)
321         add_definitions(-DWITH_FRAMESERVER)
322 endif()
323
324 if(WITH_IMAGE_HDR)
325         add_definitions(-DWITH_HDR)
326 endif()
327
328 if(WITH_CODEC_AVI)
329         list(APPEND INC
330                 ../avi
331         )
332         add_definitions(-DWITH_AVI)
333 endif()
334
335 if(WITH_CODEC_QUICKTIME)
336         list(APPEND INC
337                 ../quicktime
338         )
339         list(APPEND INC_SYS
340                 ${QUICKTIME_INCLUDE_DIRS}
341         )
342         add_definitions(-DWITH_QUICKTIME)
343 endif()
344
345 if(WITH_CODEC_FFMPEG)
346         list(APPEND SRC
347                 intern/writeffmpeg.c
348                 BKE_writeffmpeg.h
349         )
350         list(APPEND INC
351                 ../../../intern/ffmpeg
352         )
353         list(APPEND INC_SYS
354                 ${FFMPEG_INCLUDE_DIRS}
355         )
356         add_definitions(-DWITH_FFMPEG)
357
358         remove_strict_flags_file(
359                 intern/writeffmpeg.c
360         )
361 endif()
362
363 if(WITH_PYTHON)
364         list(APPEND INC
365                 ../python
366         )
367         add_definitions(-DWITH_PYTHON)
368
369         if(WITH_PYTHON_SECURITY)
370                 add_definitions(-DWITH_PYTHON_SECURITY)
371         endif()
372 endif()
373
374 if(WITH_MOD_FLUID)
375         list(APPEND INC
376                 ../../../intern/elbeem/extern
377         )
378         add_definitions(-DWITH_MOD_FLUID)
379 endif()
380
381 if(WITH_MOD_SMOKE)
382         add_definitions(-DWITH_SMOKE)
383 endif()
384
385 if(WITH_MOD_OCEANSIM)
386         add_definitions(-DWITH_OCEANSIM)
387 endif()
388
389 if(WITH_JACK)
390         add_definitions(-DWITH_JACK)
391 endif()
392
393 if(WITH_LZO)
394         list(APPEND INC_SYS
395                 ../../../extern/lzo/minilzo
396         )
397         add_definitions(-DWITH_LZO)
398 endif()
399
400 if(WITH_LZMA)
401         list(APPEND INC_SYS
402                 ../../../extern/lzma
403         )
404         add_definitions(-DWITH_LZMA)
405 endif()
406
407 if(WITH_GAMEENGINE)
408         list(APPEND INC_SYS
409                 ../../../extern/recastnavigation
410         )
411         list(APPEND SRC
412                 intern/navmesh_conversion.c
413                 BKE_navmesh_conversion.h
414         )
415
416         add_definitions(-DWITH_GAMEENGINE)
417 endif()
418
419 if(WITH_LIBMV)
420         add_definitions(-DWITH_LIBMV)
421 endif()
422
423 if(WITH_FFTW3)
424         list(APPEND INC_SYS
425                 ${FFTW3_INCLUDE_DIRS}
426         )
427         add_definitions(-DFFTW3=1)
428 endif()
429
430 if(WITH_INTERNATIONAL)
431         add_definitions(-DWITH_INTERNATIONAL)
432 endif()
433
434 if(WITH_FREESTYLE)
435         add_definitions(-DWITH_FREESTYLE)
436 endif()
437
438 ## Warnings as errors, this is too strict!
439 #if(MSVC)
440 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
441 #endif()
442
443 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")