merge from trunk #37722
[blender-staging.git] / source / blender / blenkernel / CMakeLists.txt
1 # $Id$
2 # ***** BEGIN GPL LICENSE BLOCK *****
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
20 #
21 # The Original Code is: all of this file.
22 #
23 # Contributor(s): Jacques Beaurain.
24 #
25 # ***** END GPL LICENSE BLOCK *****
26
27 if(WITH_CODEC_FFMPEG)
28         # FFMPEG gives warnigns which are hard to avoid across multiple versions.
29         remove_strict_flags()
30 endif()
31
32 set(INC 
33         .
34         ../avi
35         ../blenlib
36         ../blenloader
37         ../gpu
38         ../ikplugin
39         ../imbuf
40         ../makesdna
41         ../makesrna
42         ../modifiers
43         ../nodes
44         ../editors/include
45         ../render/extern/include
46         ../../../intern/audaspace/intern
47         ../../../intern/ffmpeg
48         ../../../intern/bsp/extern ../blenfont
49         ../../../intern/decimation/extern
50         ../../../intern/elbeem/extern
51         ../../../intern/guardedalloc
52         ../../../intern/iksolver/extern
53         ../../../intern/memutil
54         ../../../intern/opennl/extern
55         ../../../intern/smoke/extern
56         ../../../intern/mikktspace
57         ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h
58 )
59
60 set(INC_SYS
61         ${GLEW_INCLUDE_PATH}
62         ${ZLIB_INCLUDE_DIRS}
63 )
64
65 set(SRC
66         intern/BME_Customdata.c
67         intern/BME_conversions.c
68         intern/BME_eulers.c
69         intern/BME_mesh.c
70         intern/BME_structure.c
71         intern/BME_tools.c
72         intern/CCGSubSurf.c
73         intern/DerivedMesh.c
74         intern/action.c
75         intern/anim.c
76         intern/anim_sys.c
77         intern/armature.c
78         intern/blender.c
79         intern/bmfont.c
80         intern/boids.c
81         intern/booleanops_mesh.c
82         intern/brush.c
83         intern/bullet.c
84         intern/bvhutils.c
85         intern/cdderivedmesh.c
86         intern/cloth.c
87         intern/collision.c
88         intern/colortools.c
89         intern/constraint.c
90         intern/context.c
91         intern/curve.c
92         intern/customdata.c
93         intern/customdata_file.c
94         intern/deform.c
95         intern/depsgraph.c
96         intern/displist.c
97         intern/effect.c
98         intern/fcurve.c
99         intern/fluidsim.c
100         intern/fmodifier.c
101         intern/font.c
102         intern/gpencil.c
103         intern/group.c
104         intern/icons.c
105         intern/idcode.c
106         intern/idprop.c
107         intern/image.c
108         intern/image_gen.c
109         intern/implicit.c
110         intern/ipo.c
111         intern/key.c
112         intern/lattice.c
113         intern/library.c
114         intern/material.c
115         intern/mball.c
116         intern/mesh.c
117         intern/mesh_validate.c
118         intern/modifier.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/subsurf_ccg.c
143         intern/suggestions.c
144         intern/text.c
145         intern/texture.c
146         intern/unit.c
147         intern/world.c
148         intern/writeavi.c
149         intern/writeffmpeg.c
150         intern/writeframeserver.c
151         
152         BKE_DerivedMesh.h
153         BKE_action.h
154         BKE_anim.h
155         BKE_animsys.h
156         BKE_armature.h
157         BKE_array_mallocn.h
158         BKE_blender.h
159         BKE_bmesh.h
160         BKE_bmeshCustomData.h
161         BKE_bmfont.h
162         BKE_bmfont_types.h
163         BKE_boids.h
164         BKE_booleanops_mesh.h
165         BKE_brush.h
166         BKE_bullet.h
167         BKE_bvhutils.h
168         BKE_cdderivedmesh.h
169         BKE_cloth.h
170         BKE_collision.h
171         BKE_colortools.h
172         BKE_constraint.h
173         BKE_context.h
174         BKE_curve.h
175         BKE_customdata.h
176         BKE_customdata_file.h
177         BKE_deform.h
178         BKE_depsgraph.h
179         BKE_displist.h
180         BKE_effect.h
181         BKE_endian.h
182         BKE_fcurve.h
183         BKE_fluidsim.h
184         BKE_font.h
185         BKE_global.h
186         BKE_gpencil.h
187         BKE_group.h
188         BKE_icons.h
189         BKE_idcode.h
190         BKE_idprop.h
191         BKE_image.h
192         BKE_ipo.h
193         BKE_key.h
194         BKE_lattice.h
195         BKE_library.h
196         BKE_main.h
197         BKE_material.h
198         BKE_mball.h
199         BKE_mesh.h
200         BKE_modifier.h
201         BKE_multires.h
202         BKE_nla.h
203         BKE_node.h
204         BKE_object.h
205         BKE_packedFile.h
206         BKE_paint.h
207         BKE_particle.h
208         BKE_plugin_types.h
209         BKE_pointcache.h
210         BKE_property.h
211         BKE_report.h
212         BKE_sca.h
213         BKE_scene.h
214         BKE_screen.h
215         BKE_script.h
216         BKE_sequencer.h
217         BKE_shrinkwrap.h
218         BKE_sketch.h
219         BKE_smoke.h
220         BKE_softbody.h
221         BKE_sound.h
222         BKE_subsurf.h
223         BKE_suggestions.h
224         BKE_text.h
225         BKE_texture.h
226         BKE_unit.h
227         BKE_utildefines.h
228         BKE_world.h
229         BKE_writeavi.h
230         BKE_writeffmpeg.h
231         BKE_writeframeserver.h
232         depsgraph_private.h
233         intern/CCGSubSurf.h
234         intern/bmesh_private.h
235         nla_private.h
236 )
237
238 add_definitions(-DGLEW_STATIC)
239
240 if(WITH_BULLET)
241         list(APPEND INC ../../../extern/bullet2/src)
242         add_definitions(-DUSE_BULLET)
243 endif()
244
245 if(WITH_MOD_CLOTH_ELTOPO)
246         list(APPEND INC ../../../extern/eltopo)
247         add_definitions(-DWITH_ELTOPO)
248 endif()
249
250 if(WITH_IMAGE_OPENEXR)
251         add_definitions(-DWITH_OPENEXR)
252 endif()
253
254 if(WITH_IMAGE_TIFF)
255         add_definitions(-DWITH_TIFF)
256 endif()
257
258 if(WITH_IMAGE_OPENJPEG)
259         add_definitions(-DWITH_OPENJPEG)
260 endif()
261
262 if(WITH_IMAGE_DDS)
263         add_definitions(-DWITH_DDS)
264 endif()
265
266 if(WITH_IMAGE_CINEON)
267         add_definitions(-DWITH_CINEON)
268 endif()
269
270 if(WITH_IMAGE_HDR)
271         add_definitions(-DWITH_HDR)
272 endif()
273
274 if(WITH_CODEC_QUICKTIME)
275         list(APPEND INC ../quicktime)
276         list(APPEND INC_SYS ${QUICKTIME_INCLUDE_DIRS})
277         add_definitions(-DWITH_QUICKTIME)
278 endif()
279
280 if(WITH_CODEC_FFMPEG)
281         list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
282         add_definitions(-DWITH_FFMPEG)
283 endif()
284
285 if(WITH_PYTHON)
286         list(APPEND INC ../python)
287         list(APPEND INC_SYS ${PYTHON_INCLUDE_DIRS})
288         add_definitions(-DWITH_PYTHON)
289
290         if(WITH_PYTHON_SECURITY)
291                 add_definitions(-DWITH_PYTHON_SECURITY)
292         endif()
293 endif()
294
295 if(WITH_OPENMP)
296         add_definitions(-DPARALLEL=1)
297 endif()
298
299 if(NOT WITH_MOD_FLUID)
300         add_definitions(-DDISABLE_ELBEEM)
301 endif()
302
303 if(WITH_JACK)
304         add_definitions(-DWITH_JACK)
305 endif()
306
307 if(WITH_LZO)
308         list(APPEND INC_SYS ../../../extern/lzo/minilzo)
309         add_definitions(-DWITH_LZO)
310 endif()
311
312 if(WITH_LZMA)
313         list(APPEND INC_SYS ../../../extern/lzma)
314         add_definitions(-DWITH_LZMA)
315 endif()
316
317 if(MSVC)
318         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
319 endif()
320
321 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")