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