GPencil: Split Curve geometry functions to new file
[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 # ***** END GPL LICENSE BLOCK *****
20
21 set(INC
22   .
23   ../blenfont
24   ../blenlib
25   ../blenloader
26   ../blentranslation
27   ../bmesh
28   ../depsgraph
29   ../draw
30   ../gpencil_modifiers
31   ../gpu
32   ../ikplugin
33   ../imbuf
34   ../makesdna
35   ../makesrna
36   ../modifiers
37   ../nodes
38   ../physics
39   ../shader_fx
40   ../render/extern/include
41   ../../../intern/ghost
42   ../../../intern/glew-mx
43   ../../../intern/guardedalloc
44   ../../../intern/iksolver/extern
45   ../../../intern/atomic
46   ../../../intern/clog
47   ../../../intern/libmv
48   ../../../intern/mantaflow/extern
49   ../../../intern/memutil
50   ../../../intern/mikktspace
51   ../../../intern/opensubdiv
52   ../../../extern/curve_fit_nd
53
54   # dna_type_offsets.h
55   ${CMAKE_CURRENT_BINARY_DIR}/../makesdna/intern
56 )
57
58 set(INC_SYS
59   ${GLEW_INCLUDE_PATH}
60   ${ZLIB_INCLUDE_DIRS}
61 )
62
63 set(SRC
64   ${CMAKE_SOURCE_DIR}/release/datafiles/userdef/userdef_default.c
65   intern/CCGSubSurf.c
66   intern/CCGSubSurf_legacy.c
67   intern/CCGSubSurf_opensubdiv.c
68   intern/CCGSubSurf_opensubdiv_converter.c
69   intern/CCGSubSurf_util.c
70   intern/DerivedMesh.c
71   intern/action.c
72   intern/addon.c
73   intern/anim_data.c
74   intern/anim_path.c
75   intern/anim_sys.c
76   intern/anim_visualization.c
77   intern/appdir.c
78   intern/armature.c
79   intern/armature_update.c
80   intern/autoexec.c
81   intern/blender.c
82   intern/blender_copybuffer.c
83   intern/blender_undo.c
84   intern/blender_user_menu.c
85   intern/blendfile.c
86   intern/boids.c
87   intern/bpath.c
88   intern/brush.c
89   intern/bvhutils.c
90   intern/cachefile.c
91   intern/callbacks.c
92   intern/camera.c
93   intern/cdderivedmesh.c
94   intern/cloth.c
95   intern/collection.c
96   intern/collision.c
97   intern/colorband.c
98   intern/colortools.c
99   intern/constraint.c
100   intern/context.c
101   intern/crazyspace.c
102   intern/curve.c
103   intern/curve_decimate.c
104   intern/curveprofile.c
105   intern/customdata.c
106   intern/customdata_file.c
107   intern/data_transfer.c
108   intern/deform.c
109   intern/displist.c
110   intern/displist_tangent.c
111   intern/dynamicpaint.c
112   intern/editlattice.c
113   intern/editmesh.c
114   intern/editmesh_bvh.c
115   intern/editmesh_cache.c
116   intern/editmesh_tangent.c
117   intern/effect.c
118   intern/fcurve.c
119   intern/fcurve_driver.c
120   intern/fluid.c
121   intern/fmodifier.c
122   intern/font.c
123   intern/freestyle.c
124   intern/gpencil.c
125   intern/gpencil_curve.c
126   intern/gpencil_geom.c
127   intern/gpencil_modifier.c
128   intern/hair.c
129   intern/icons.c
130   intern/icons_rasterize.c
131   intern/idprop.c
132   intern/idprop_utils.c
133   intern/idtype.c
134   intern/image.c
135   intern/image_gen.c
136   intern/image_save.c
137   intern/ipo.c
138   intern/kelvinlet.c
139   intern/key.c
140   intern/keyconfig.c
141   intern/lattice.c
142   intern/layer.c
143   intern/layer_utils.c
144   intern/lib_id.c
145   intern/lib_id_delete.c
146   intern/lib_override.c
147   intern/lib_query.c
148   intern/lib_remap.c
149   intern/library.c
150   intern/light.c
151   intern/lightprobe.c
152   intern/linestyle.c
153   intern/main.c
154   intern/main_idmap.c
155   intern/mask.c
156   intern/mask_evaluate.c
157   intern/mask_rasterize.c
158   intern/material.c
159   intern/mball.c
160   intern/mball_tessellate.c
161   intern/mesh.c
162   intern/mesh_convert.c
163   intern/mesh_evaluate.c
164   intern/mesh_iterators.c
165   intern/mesh_mapping.c
166   intern/mesh_merge.c
167   intern/mesh_mirror.c
168   intern/mesh_remap.c
169   intern/mesh_remesh_voxel.c
170   intern/mesh_runtime.c
171   intern/mesh_tangent.c
172   intern/mesh_validate.c
173   intern/modifier.c
174   intern/movieclip.c
175   intern/multires.c
176   intern/multires_reshape.c
177   intern/multires_reshape_apply_base.c
178   intern/multires_reshape_ccg.c
179   intern/multires_reshape_smooth.c
180   intern/multires_reshape_subdivide.c
181   intern/multires_reshape_util.c
182   intern/multires_reshape_vertcos.c
183   intern/multires_subdiv.c
184   intern/multires_unsubdivide.c
185   intern/nla.c
186   intern/node.c
187   intern/object.c
188   intern/object_deform.c
189   intern/object_dupli.c
190   intern/object_facemap.c
191   intern/object_update.c
192   intern/ocean.c
193   intern/ocean_spectrum.c
194   intern/outliner_treehash.c
195   intern/packedFile.c
196   intern/paint.c
197   intern/paint_toolslots.c
198   intern/particle.c
199   intern/particle_child.c
200   intern/particle_distribute.c
201   intern/particle_system.c
202   intern/pbvh.c
203   intern/pbvh_bmesh.c
204   intern/pointcache.c
205   intern/pointcloud.c
206   intern/report.c
207   intern/rigidbody.c
208   intern/scene.c
209   intern/screen.c
210   intern/seqcache.c
211   intern/seqeffects.c
212   intern/seqmodifier.c
213   intern/seqprefetch.c
214   intern/sequencer.c
215   intern/shader_fx.c
216   intern/shrinkwrap.c
217   intern/simulation.cc
218   intern/softbody.c
219   intern/sound.c
220   intern/speaker.c
221   intern/studiolight.c
222   intern/subdiv.c
223   intern/subdiv_ccg.c
224   intern/subdiv_ccg_mask.c
225   intern/subdiv_ccg_material.c
226   intern/subdiv_converter.c
227   intern/subdiv_converter_mesh.c
228   intern/subdiv_deform.c
229   intern/subdiv_displacement.c
230   intern/subdiv_displacement_multires.c
231   intern/subdiv_eval.c
232   intern/subdiv_foreach.c
233   intern/subdiv_mesh.c
234   intern/subdiv_stats.c
235   intern/subdiv_topology.c
236   intern/subsurf_ccg.c
237   intern/text.c
238   intern/text_suggestions.c
239   intern/texture.c
240   intern/tracking.c
241   intern/tracking_auto.c
242   intern/tracking_detect.c
243   intern/tracking_plane_tracker.c
244   intern/tracking_region_tracker.c
245   intern/tracking_solver.c
246   intern/tracking_stabilize.c
247   intern/tracking_util.c
248   intern/undo_system.c
249   intern/unit.c
250   intern/volume.cc
251   intern/volume_render.cc
252   intern/workspace.c
253   intern/world.c
254   intern/writeavi.c
255
256   BKE_DerivedMesh.h
257   BKE_action.h
258   BKE_addon.h
259   BKE_anim_data.h
260   BKE_anim_path.h
261   BKE_anim_visualization.h
262   BKE_animsys.h
263   BKE_appdir.h
264   BKE_armature.h
265   BKE_autoexec.h
266   BKE_blender.h
267   BKE_blender_copybuffer.h
268   BKE_blender_undo.h
269   BKE_blender_user_menu.h
270   BKE_blender_version.h
271   BKE_blendfile.h
272   BKE_boids.h
273   BKE_bpath.h
274   BKE_brush.h
275   BKE_bvhutils.h
276   BKE_cachefile.h
277   BKE_callbacks.h
278   BKE_camera.h
279   BKE_ccg.h
280   BKE_cdderivedmesh.h
281   BKE_cloth.h
282   BKE_collection.h
283   BKE_collision.h
284   BKE_colorband.h
285   BKE_colortools.h
286   BKE_constraint.h
287   BKE_context.h
288   BKE_crazyspace.h
289   BKE_curve.h
290   BKE_curveprofile.h
291   BKE_customdata.h
292   BKE_customdata_file.h
293   BKE_data_transfer.h
294   BKE_deform.h
295   BKE_displist.h
296   BKE_displist_tangent.h
297   BKE_duplilist.h
298   BKE_dynamicpaint.h
299   BKE_editlattice.h
300   BKE_editmesh.h
301   BKE_editmesh_bvh.h
302   BKE_editmesh_cache.h
303   BKE_editmesh_tangent.h
304   BKE_effect.h
305   BKE_fcurve.h
306   BKE_fcurve_driver.h
307   BKE_fluid.h
308   BKE_font.h
309   BKE_freestyle.h
310   BKE_global.h
311   BKE_gpencil.h
312   BKE_gpencil_curve.h
313   BKE_gpencil_geom.h
314   BKE_gpencil_modifier.h
315   BKE_hair.h
316   BKE_icons.h
317   BKE_idprop.h
318   BKE_idtype.h
319   BKE_image.h
320   BKE_ipo.h
321   BKE_kelvinlet.h
322   BKE_key.h
323   BKE_keyconfig.h
324   BKE_lattice.h
325   BKE_layer.h
326   BKE_lib_id.h
327   BKE_lib_override.h
328   BKE_lib_query.h
329   BKE_lib_remap.h
330   BKE_library.h
331   BKE_light.h
332   BKE_lightprobe.h
333   BKE_linestyle.h
334   BKE_main.h
335   BKE_main_idmap.h
336   BKE_mask.h
337   BKE_material.h
338   BKE_mball.h
339   BKE_mball_tessellate.h
340   BKE_mesh.h
341   BKE_mesh_iterators.h
342   BKE_mesh_mapping.h
343   BKE_mesh_mirror.h
344   BKE_mesh_remap.h
345   BKE_mesh_remesh_voxel.h
346   BKE_mesh_runtime.h
347   BKE_mesh_tangent.h
348   BKE_modifier.h
349   BKE_movieclip.h
350   BKE_multires.h
351   BKE_nla.h
352   BKE_node.h
353   BKE_object.h
354   BKE_object_deform.h
355   BKE_object_facemap.h
356   BKE_ocean.h
357   BKE_outliner_treehash.h
358   BKE_packedFile.h
359   BKE_paint.h
360   BKE_particle.h
361   BKE_pbvh.h
362   BKE_pointcache.h
363   BKE_pointcloud.h
364   BKE_report.h
365   BKE_rigidbody.h
366   BKE_scene.h
367   BKE_screen.h
368   BKE_sequencer.h
369   BKE_shader_fx.h
370   BKE_shrinkwrap.h
371   BKE_simulation.h
372   BKE_softbody.h
373   BKE_sound.h
374   BKE_speaker.h
375   BKE_studiolight.h
376   BKE_subdiv.h
377   BKE_subdiv_ccg.h
378   BKE_subdiv_deform.h
379   BKE_subdiv_eval.h
380   BKE_subdiv_foreach.h
381   BKE_subdiv_mesh.h
382   BKE_subdiv_topology.h
383   BKE_subsurf.h
384   BKE_text.h
385   BKE_text_suggestions.h
386   BKE_texture.h
387   BKE_tracking.h
388   BKE_undo_system.h
389   BKE_unit.h
390   BKE_volume.h
391   BKE_volume_render.h
392   BKE_workspace.h
393   BKE_world.h
394   BKE_writeavi.h
395
396   nla_private.h
397   particle_private.h
398   tracking_private.h
399   intern/CCGSubSurf.h
400   intern/CCGSubSurf_inline.h
401   intern/CCGSubSurf_intern.h
402   intern/data_transfer_intern.h
403   intern/lib_intern.h
404   intern/multires_inline.h
405   intern/multires_reshape.h
406   intern/multires_unsubdivide.h
407   intern/pbvh_intern.h
408   intern/subdiv_converter.h
409   intern/subdiv_inline.h
410 )
411
412 set(LIB
413   bf_blenfont
414   bf_blenlib
415   bf_blenloader
416   bf_blentranslation
417   bf_bmesh
418   bf_depsgraph
419   bf_draw
420   bf_gpencil_modifiers
421   bf_gpu
422   bf_ikplugin
423   bf_imbuf
424   bf_intern_clog
425   bf_intern_ghost
426   bf_intern_guardedalloc
427   bf_intern_libmv  # Uses stub when disabled.
428   bf_intern_mikktspace
429   bf_intern_opensubdiv  # Uses stub when disabled.
430   bf_modifiers
431   bf_nodes
432   bf_physics
433   bf_rna
434   bf_shader_fx
435 )
436
437 if(WITH_BINRELOC)
438   list(APPEND INC_SYS
439     ${BINRELOC_INCLUDE_DIRS}
440   )
441   list(APPEND LIB
442     extern_binreloc
443   )
444   add_definitions(-DWITH_BINRELOC)
445 endif()
446
447 add_definitions(${GL_DEFINITIONS})
448
449 if(WIN32)
450   list(APPEND INC
451     ../../../intern/utfconv
452   )
453 endif()
454
455 if(WITH_AUDASPACE)
456   add_definitions(-DWITH_AUDASPACE)
457
458   list(APPEND INC_SYS
459     ${AUDASPACE_C_INCLUDE_DIRS}
460   )
461   list(APPEND LIB
462     ${AUDASPACE_C_LIBRARIES}
463     ${AUDASPACE_PY_LIBRARIES}
464   )
465 endif()
466
467 if(WITH_BULLET)
468   list(APPEND INC_SYS
469     ${BULLET_INCLUDE_DIRS}
470   )
471   list(APPEND INC
472     ../../../intern/rigidbody
473   )
474   list(APPEND LIB
475     bf_intern_rigidbody
476     extern_bullet
477
478     ${BULLET_LIBRARIES}
479   )
480   add_definitions(-DWITH_BULLET)
481 endif()
482
483 if(WITH_IMAGE_OPENEXR)
484   add_definitions(-DWITH_OPENEXR)
485 endif()
486
487 if(WITH_IMAGE_TIFF)
488   add_definitions(-DWITH_TIFF)
489 endif()
490
491 if(WITH_OPENIMAGEIO)
492   add_definitions(-DWITH_OPENIMAGEIO)
493 endif()
494
495 if(WITH_IMAGE_OPENJPEG)
496   add_definitions(-DWITH_OPENJPEG)
497 endif()
498
499 if(WITH_IMAGE_DDS)
500   add_definitions(-DWITH_DDS)
501 endif()
502
503 if(WITH_IMAGE_CINEON)
504   add_definitions(-DWITH_CINEON)
505 endif()
506
507 if(WITH_IMAGE_FRAMESERVER)
508   add_definitions(-DWITH_FRAMESERVER)
509 endif()
510
511 if(WITH_IMAGE_HDR)
512   add_definitions(-DWITH_HDR)
513 endif()
514
515 if(WITH_CODEC_AVI)
516   list(APPEND INC
517     ../io/avi
518   )
519   add_definitions(-DWITH_AVI)
520 endif()
521
522 if(WITH_CODEC_FFMPEG)
523   list(APPEND SRC
524     intern/writeffmpeg.c
525     BKE_writeffmpeg.h
526   )
527   list(APPEND INC
528     ../../../intern/ffmpeg
529   )
530   list(APPEND INC_SYS
531     ${FFMPEG_INCLUDE_DIRS}
532   )
533   list(APPEND LIB
534     ${FFMPEG_LIBRARIES}
535   )
536   add_definitions(-DWITH_FFMPEG)
537
538   remove_strict_c_flags_file(
539     intern/writeffmpeg.c
540   )
541 endif()
542
543 if(WITH_PYTHON)
544   list(APPEND INC
545     ../python
546   )
547   list(APPEND LIB
548     bf_python
549     bf_python_bmesh
550   )
551   add_definitions(-DWITH_PYTHON)
552
553   if(WITH_PYTHON_SAFETY)
554     add_definitions(-DWITH_PYTHON_SAFETY)
555   endif()
556
557   if(WITH_PYTHON_SECURITY)
558     add_definitions(-DWITH_PYTHON_SECURITY)
559   endif()
560
561
562   if(PYTHON_EXECUTABLE)
563     get_filename_component(_python_exe_name ${PYTHON_EXECUTABLE} NAME)
564     add_definitions(-DPYTHON_EXECUTABLE_NAME=${_python_exe_name})
565     unset(_python_exe_name)
566   endif()
567 endif()
568
569 if(WITH_MOD_FLUID)
570   list(APPEND LIB
571     bf_intern_mantaflow
572   )
573   add_definitions(-DWITH_FLUID)
574 endif()
575
576 if(WITH_MOD_OCEANSIM)
577   add_definitions(-DWITH_OCEANSIM)
578 endif()
579
580 if(WITH_JACK)
581   add_definitions(-DWITH_JACK)
582 endif()
583
584 if(WITH_LZO)
585   if(WITH_SYSTEM_LZO)
586     list(APPEND INC_SYS
587       ${LZO_INCLUDE_DIR}
588     )
589     list(APPEND LIB
590       ${LZO_LIBRARIES}
591     )
592     add_definitions(-DWITH_SYSTEM_LZO)
593   else()
594     list(APPEND INC_SYS
595       ../../../extern/lzo/minilzo
596     )
597     list(APPEND LIB
598       extern_minilzo
599     )
600   endif()
601   add_definitions(-DWITH_LZO)
602 endif()
603
604 if(WITH_LZMA)
605   list(APPEND INC_SYS
606     ../../../extern/lzma
607   )
608   list(APPEND LIB
609     extern_lzma
610   )
611   add_definitions(-DWITH_LZMA)
612 endif()
613
614 if(WITH_LIBMV)
615   add_definitions(-DWITH_LIBMV)
616 endif()
617
618 if(WITH_FFTW3)
619   list(APPEND INC_SYS
620     ${FFTW3_INCLUDE_DIRS}
621   )
622   list(APPEND LIB
623     ${FFTW3_LIBRARIES}
624   )
625   add_definitions(-DFFTW3=1)
626 endif()
627
628 if(WITH_INTERNATIONAL)
629   add_definitions(-DWITH_INTERNATIONAL)
630 endif()
631
632 if(WITH_FREESTYLE)
633   add_definitions(-DWITH_FREESTYLE)
634 endif()
635
636 if(WITH_ALEMBIC)
637   list(APPEND INC
638     ../io/alembic
639   )
640   add_definitions(-DWITH_ALEMBIC)
641 endif()
642
643 if(WITH_OPENSUBDIV)
644   list(APPEND INC_SYS
645     ${OPENSUBDIV_INCLUDE_DIRS}
646   )
647   list(APPEND LIB
648     ${OPENSUBDIV_LIBRARIES}
649   )
650   add_definitions(-DWITH_OPENSUBDIV)
651 endif()
652
653 if(WITH_OPENVDB)
654   list(APPEND INC
655      ../../../intern/openvdb
656   )
657   list(APPEND INC_SYS
658     ${OPENVDB_INCLUDE_DIRS}
659   )
660   list(APPEND LIB
661     bf_intern_openvdb
662     ${OPENVDB_LIBRARIES}
663   )
664   add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS})
665 endif()
666
667 if(WITH_QUADRIFLOW)
668   list(APPEND INC
669      ../../../intern/quadriflow
670   )
671   list(APPEND LIB
672      bf_intern_quadriflow
673   )
674   add_definitions(-DWITH_QUADRIFLOW)
675 endif()
676
677 if(WITH_XR_OPENXR)
678   add_definitions(-DWITH_XR_OPENXR)
679 endif()
680
681 # # Warnings as errors, this is too strict!
682 # if(MSVC)
683 #    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
684 # endif()
685
686 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
687
688 # Needed so we can use dna_type_offsets.h for defaults initialization.
689 add_dependencies(bf_blenkernel bf_dna)