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