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