ba6776e1864ac83a6a3cdb1519c69ec47bc15f1e
[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         ../avi
29         ../blenfont
30         ../blenlib
31         ../blenloader
32         ../gpu
33         ../ikplugin
34         ../imbuf
35         ../makesdna
36         ../makesrna
37         ../modifiers
38         ../nodes
39         ../render/extern/include
40         ../../../intern/bsp/extern
41         ../../../intern/decimation/extern
42         ../../../intern/elbeem/extern
43         ../../../intern/guardedalloc
44         ../../../intern/iksolver/extern
45         ../../../intern/memutil
46         ../../../intern/mikktspace
47         ../../../intern/opennl/extern
48         ../../../intern/smoke/extern
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/BME_Customdata.c
61         intern/BME_conversions.c
62         intern/BME_eulers.c
63         intern/BME_mesh.c
64         intern/BME_structure.c
65         intern/BME_tools.c
66         intern/CCGSubSurf.c
67         intern/DerivedMesh.c
68         intern/action.c
69         intern/anim.c
70         intern/anim_sys.c
71         intern/armature.c
72         intern/blender.c
73         intern/bmfont.c
74         intern/boids.c
75         intern/booleanops_mesh.c
76         intern/brush.c
77         intern/bullet.c
78         intern/bvhutils.c
79         intern/camera.c
80         intern/cdderivedmesh.c
81         intern/cloth.c
82         intern/collision.c
83         intern/colortools.c
84         intern/constraint.c
85         intern/context.c
86         intern/curve.c
87         intern/customdata.c
88         intern/customdata_file.c
89         intern/deform.c
90         intern/depsgraph.c
91         intern/displist.c
92         intern/effect.c
93         intern/fcurve.c
94         intern/fluidsim.c
95         intern/fmodifier.c
96         intern/font.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/lattice.c
108         intern/library.c
109         intern/material.c
110         intern/mball.c
111         intern/mesh.c
112         intern/mesh_validate.c
113         intern/modifier.c
114         intern/multires.c
115         intern/nla.c
116         intern/node.c
117         intern/object.c
118         intern/packedFile.c
119         intern/paint.c
120         intern/particle.c
121         intern/particle_system.c
122         intern/pointcache.c
123         intern/property.c
124         intern/report.c
125         intern/sca.c
126         intern/scene.c
127         intern/screen.c
128         intern/script.c
129         intern/seqcache.c
130         intern/seqeffects.c
131         intern/sequencer.c
132         intern/shrinkwrap.c
133         intern/sketch.c
134         intern/smoke.c
135         intern/softbody.c
136         intern/sound.c
137         intern/speaker.c
138         intern/subsurf_ccg.c
139         intern/suggestions.c
140         intern/text.c
141         intern/texture.c
142         intern/unit.c
143         intern/world.c
144         intern/writeavi.c
145         intern/writeffmpeg.c
146         intern/writeframeserver.c
147         
148         BKE_DerivedMesh.h
149         BKE_action.h
150         BKE_anim.h
151         BKE_animsys.h
152         BKE_armature.h
153         BKE_array_mallocn.h
154         BKE_blender.h
155         BKE_bmesh.h
156         BKE_bmeshCustomData.h
157         BKE_bmfont.h
158         BKE_bmfont_types.h
159         BKE_boids.h
160         BKE_booleanops_mesh.h
161         BKE_brush.h
162         BKE_bullet.h
163         BKE_bvhutils.h
164         BKE_camera.h
165         BKE_cdderivedmesh.h
166         BKE_cloth.h
167         BKE_collision.h
168         BKE_colortools.h
169         BKE_constraint.h
170         BKE_context.h
171         BKE_curve.h
172         BKE_customdata.h
173         BKE_customdata_file.h
174         BKE_deform.h
175         BKE_depsgraph.h
176         BKE_displist.h
177         BKE_effect.h
178         BKE_fcurve.h
179         BKE_fluidsim.h
180         BKE_font.h
181         BKE_global.h
182         BKE_gpencil.h
183         BKE_group.h
184         BKE_icons.h
185         BKE_idcode.h
186         BKE_idprop.h
187         BKE_image.h
188         BKE_ipo.h
189         BKE_key.h
190         BKE_lattice.h
191         BKE_library.h
192         BKE_main.h
193         BKE_material.h
194         BKE_mball.h
195         BKE_mesh.h
196         BKE_modifier.h
197         BKE_multires.h
198         BKE_nla.h
199         BKE_node.h
200         BKE_object.h
201         BKE_packedFile.h
202         BKE_paint.h
203         BKE_particle.h
204         BKE_plugin_types.h
205         BKE_pointcache.h
206         BKE_property.h
207         BKE_report.h
208         BKE_sca.h
209         BKE_scene.h
210         BKE_screen.h
211         BKE_script.h
212         BKE_sequencer.h
213         BKE_shrinkwrap.h
214         BKE_sketch.h
215         BKE_smoke.h
216         BKE_softbody.h
217         BKE_sound.h
218         BKE_speaker.h
219         BKE_subsurf.h
220         BKE_suggestions.h
221         BKE_text.h
222         BKE_texture.h
223         BKE_unit.h
224         BKE_utildefines.h
225         BKE_world.h
226         BKE_writeavi.h
227         BKE_writeffmpeg.h
228         BKE_writeframeserver.h
229         depsgraph_private.h
230         intern/CCGSubSurf.h
231         intern/bmesh_private.h
232         nla_private.h
233 )
234
235 add_definitions(-DGLEW_STATIC)
236
237 if(WITH_AUDASPACE)
238         list(APPEND INC
239                 ../../../intern/audaspace/intern
240         )
241         add_definitions(-DWITH_AUDASPACE)
242 endif()
243
244 if(WITH_BULLET)
245         list(APPEND INC
246                 ../../../extern/bullet2/src
247         )
248         add_definitions(-DUSE_BULLET)
249 endif()
250
251 if(WITH_MOD_CLOTH_ELTOPO)
252         list(APPEND INC
253                 ../../../extern/eltopo
254         )
255         add_definitions(-DWITH_ELTOPO)
256 endif()
257
258 if(WITH_IMAGE_OPENEXR)
259         add_definitions(-DWITH_OPENEXR)
260 endif()
261
262 if(WITH_IMAGE_TIFF)
263         add_definitions(-DWITH_TIFF)
264 endif()
265
266 if(WITH_IMAGE_OPENJPEG)
267         add_definitions(-DWITH_OPENJPEG)
268 endif()
269
270 if(WITH_IMAGE_DDS)
271         add_definitions(-DWITH_DDS)
272 endif()
273
274 if(WITH_IMAGE_CINEON)
275         add_definitions(-DWITH_CINEON)
276 endif()
277
278 if(WITH_IMAGE_FRAMESERVER)
279         add_definitions(-DWITH_FRAMESERVER)
280 endif()
281
282 if(WITH_IMAGE_HDR)
283         add_definitions(-DWITH_HDR)
284 endif()
285
286 if(WITH_CODEC_QUICKTIME)
287         list(APPEND INC
288                 ../quicktime
289         )
290         list(APPEND INC_SYS
291                 ${QUICKTIME_INCLUDE_DIRS}
292         )
293         add_definitions(-DWITH_QUICKTIME)
294 endif()
295
296 if(WITH_CODEC_FFMPEG)
297         list(APPEND INC
298                 ../../../intern/ffmpeg
299         )
300         list(APPEND INC_SYS
301                 ${FFMPEG_INCLUDE_DIRS}
302         )
303         add_definitions(-DWITH_FFMPEG)
304
305         remove_strict_flags_file(
306                 intern/writeffmpeg.c
307         )
308 endif()
309
310 if(WITH_PYTHON)
311         list(APPEND INC
312                 ../python
313         )
314         list(APPEND INC_SYS
315                 ${PYTHON_INCLUDE_DIRS}
316         )
317         add_definitions(-DWITH_PYTHON)
318
319         if(WITH_PYTHON_SECURITY)
320                 add_definitions(-DWITH_PYTHON_SECURITY)
321         endif()
322 endif()
323
324 if(WITH_OPENMP)
325         add_definitions(-DPARALLEL=1)
326 endif()
327
328 if(WITH_MOD_FLUID)
329         add_definitions(-DWITH_MOD_FLUID)
330 endif()
331
332 if(WITH_MOD_SMOKE)
333         add_definitions(-DWITH_SMOKE)
334 endif()
335
336 if(WITH_JACK)
337         add_definitions(-DWITH_JACK)
338 endif()
339
340 if(WITH_LZO)
341         list(APPEND INC_SYS
342                 ../../../extern/lzo/minilzo
343         )
344         add_definitions(-DWITH_LZO)
345 endif()
346
347 if(WITH_LZMA)
348         list(APPEND INC_SYS
349                 ../../../extern/lzma
350         )
351         add_definitions(-DWITH_LZMA)
352 endif()
353
354 if(WITH_GAMEENGINE)
355         list(APPEND INC_SYS
356                 ../../../extern/recastnavigation
357         )
358         list(APPEND SRC
359                 intern/navmesh_conversion.c
360                 BKE_navmesh_conversion.h
361         )
362
363         add_definitions(-DWITH_GAMEENGINE)
364 endif()
365
366 ## Warnings as errors, this is too strict!
367 #if(MSVC)
368 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
369 #endif()
370
371 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")