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