Merge with trunk r41411
[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/cdderivedmesh.c
80         intern/cloth.c
81         intern/collision.c
82         intern/colortools.c
83         intern/constraint.c
84         intern/context.c
85         intern/curve.c
86         intern/customdata.c
87         intern/customdata_file.c
88         intern/deform.c
89         intern/depsgraph.c
90         intern/displist.c
91         intern/dynamicpaint.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_cdderivedmesh.h
165         BKE_cloth.h
166         BKE_collision.h
167         BKE_colortools.h
168         BKE_constraint.h
169         BKE_context.h
170         BKE_curve.h
171         BKE_customdata.h
172         BKE_customdata_file.h
173         BKE_deform.h
174         BKE_depsgraph.h
175         BKE_displist.h
176         BKE_effect.h
177         BKE_fcurve.h
178         BKE_fluidsim.h
179         BKE_font.h
180         BKE_global.h
181         BKE_gpencil.h
182         BKE_group.h
183         BKE_icons.h
184         BKE_idcode.h
185         BKE_idprop.h
186         BKE_image.h
187         BKE_ipo.h
188         BKE_key.h
189         BKE_lattice.h
190         BKE_library.h
191         BKE_main.h
192         BKE_material.h
193         BKE_mball.h
194         BKE_mesh.h
195         BKE_modifier.h
196         BKE_multires.h
197         BKE_nla.h
198         BKE_node.h
199         BKE_object.h
200         BKE_packedFile.h
201         BKE_paint.h
202         BKE_particle.h
203         BKE_plugin_types.h
204         BKE_pointcache.h
205         BKE_property.h
206         BKE_report.h
207         BKE_sca.h
208         BKE_scene.h
209         BKE_screen.h
210         BKE_script.h
211         BKE_sequencer.h
212         BKE_shrinkwrap.h
213         BKE_sketch.h
214         BKE_smoke.h
215         BKE_softbody.h
216         BKE_sound.h
217         BKE_speaker.h
218         BKE_subsurf.h
219         BKE_suggestions.h
220         BKE_text.h
221         BKE_texture.h
222         BKE_unit.h
223         BKE_utildefines.h
224         BKE_world.h
225         BKE_writeavi.h
226         BKE_writeffmpeg.h
227         BKE_writeframeserver.h
228         depsgraph_private.h
229         intern/CCGSubSurf.h
230         intern/bmesh_private.h
231         nla_private.h
232 )
233
234 add_definitions(-DGLEW_STATIC)
235
236 if(WITH_AUDASPACE)
237         list(APPEND INC
238                 ../../../intern/audaspace/intern
239         )
240         add_definitions(-DWITH_AUDASPACE)
241 endif()
242
243 if(WITH_BULLET)
244         list(APPEND INC
245                 ../../../extern/bullet2/src
246         )
247         add_definitions(-DUSE_BULLET)
248 endif()
249
250 if(WITH_MOD_CLOTH_ELTOPO)
251         list(APPEND INC
252                 ../../../extern/eltopo
253         )
254         add_definitions(-DWITH_ELTOPO)
255 endif()
256
257 if(WITH_IMAGE_OPENEXR)
258         add_definitions(-DWITH_OPENEXR)
259 endif()
260
261 if(WITH_IMAGE_TIFF)
262         add_definitions(-DWITH_TIFF)
263 endif()
264
265 if(WITH_IMAGE_OPENJPEG)
266         add_definitions(-DWITH_OPENJPEG)
267 endif()
268
269 if(WITH_IMAGE_DDS)
270         add_definitions(-DWITH_DDS)
271 endif()
272
273 if(WITH_IMAGE_CINEON)
274         add_definitions(-DWITH_CINEON)
275 endif()
276
277 if(WITH_IMAGE_FRAMESERVER)
278         add_definitions(-DWITH_FRAMESERVER)
279 endif()
280
281 if(WITH_IMAGE_HDR)
282         add_definitions(-DWITH_HDR)
283 endif()
284
285 if(WITH_CODEC_QUICKTIME)
286         list(APPEND INC
287                 ../quicktime
288         )
289         list(APPEND INC_SYS
290                 ${QUICKTIME_INCLUDE_DIRS}
291         )
292         add_definitions(-DWITH_QUICKTIME)
293 endif()
294
295 if(WITH_CODEC_FFMPEG)
296         list(APPEND INC
297                 ../../../intern/ffmpeg
298         )
299         list(APPEND INC_SYS
300                 ${FFMPEG_INCLUDE_DIRS}
301         )
302         add_definitions(-DWITH_FFMPEG)
303
304         remove_strict_flags_file(
305                 intern/writeffmpeg.c
306         )
307 endif()
308
309 if(WITH_PYTHON)
310         list(APPEND INC
311                 ../python
312         )
313         list(APPEND INC_SYS
314                 ${PYTHON_INCLUDE_DIRS}
315         )
316         add_definitions(-DWITH_PYTHON)
317
318         if(WITH_PYTHON_SECURITY)
319                 add_definitions(-DWITH_PYTHON_SECURITY)
320         endif()
321 endif()
322
323 if(WITH_OPENMP)
324         add_definitions(-DPARALLEL=1)
325 endif()
326
327 if(WITH_MOD_FLUID)
328         add_definitions(-DWITH_MOD_FLUID)
329 endif()
330
331 if(WITH_MOD_SMOKE)
332         add_definitions(-DWITH_SMOKE)
333 endif()
334
335 if(WITH_JACK)
336         add_definitions(-DWITH_JACK)
337 endif()
338
339 if(WITH_LZO)
340         list(APPEND INC_SYS
341                 ../../../extern/lzo/minilzo
342         )
343         add_definitions(-DWITH_LZO)
344 endif()
345
346 if(WITH_LZMA)
347         list(APPEND INC_SYS
348                 ../../../extern/lzma
349         )
350         add_definitions(-DWITH_LZMA)
351 endif()
352
353 if(WITH_GAMEENGINE)
354         list(APPEND INC_SYS
355                 ../../../extern/recastnavigation
356         )
357         list(APPEND SRC
358                 intern/navmesh_conversion.c
359                 BKE_navmesh_conversion.h
360         )
361
362         add_definitions(-DWITH_GAMEENGINE)
363 endif()
364
365 ## Warnings as errors, this is too strict!
366 #if(MSVC)
367 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
368 #endif()
369
370 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")