VSE: Draw strips transparent during transform overlap
[blender.git] / source / blender / blenlib / 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   # ../blenkernel  # don't add this back!
24   ../makesdna
25   ../../../intern/atomic
26   ../../../intern/eigen
27   ../../../intern/guardedalloc
28   ../../../intern/numaapi/include
29   ../../../extern/wcwidth
30 )
31
32 set(INC_SYS
33   ${ZLIB_INCLUDE_DIRS}
34   ${FREETYPE_INCLUDE_DIRS}
35   ${GMP_INCLUDE_DIRS}
36 )
37
38 set(SRC
39   intern/BLI_args.c
40   intern/BLI_array.c
41   intern/BLI_assert.c
42   intern/BLI_color.cc
43   intern/BLI_dial_2d.c
44   intern/BLI_dynstr.c
45   intern/BLI_filelist.c
46   intern/BLI_ghash.c
47   intern/BLI_ghash_utils.c
48   intern/BLI_heap.c
49   intern/BLI_heap_simple.c
50   intern/BLI_index_range.cc
51   intern/BLI_kdopbvh.c
52   intern/BLI_linklist.c
53   intern/BLI_linklist_lockfree.c
54   intern/BLI_memarena.c
55   intern/BLI_memblock.c
56   intern/BLI_memiter.c
57   intern/BLI_mempool.c
58   intern/BLI_mmap.c
59   intern/BLI_timer.c
60   intern/DLRB_tree.c
61   intern/array_store.c
62   intern/array_store_utils.c
63   intern/array_utils.c
64   intern/astar.c
65   intern/bitmap.c
66   intern/bitmap_draw_2d.c
67   intern/boxpack_2d.c
68   intern/buffer.c
69   intern/convexhull_2d.c
70   intern/delaunay_2d.cc
71   intern/dot_export.cc
72   intern/dynlib.c
73   intern/easing.c
74   intern/edgehash.c
75   intern/endian_switch.c
76   intern/expr_pylike_eval.c
77   intern/fileops.c
78   intern/fnmatch.c
79   intern/freetypefont.c
80   intern/gsqueue.c
81   intern/hash_md5.c
82   intern/hash_mm2a.c
83   intern/hash_mm3.c
84   intern/jitter_2d.c
85   intern/kdtree_1d.c
86   intern/kdtree_2d.c
87   intern/kdtree_3d.c
88   intern/kdtree_4d.c
89   intern/lasso_2d.c
90   intern/listbase.c
91   intern/math_base.c
92   intern/math_base_inline.c
93   intern/math_base_safe_inline.c
94   intern/math_bits_inline.c
95   intern/math_boolean.cc
96   intern/math_color.c
97   intern/math_color_blend_inline.c
98   intern/math_color_inline.c
99   intern/math_geom.c
100   intern/math_geom_inline.c
101   intern/math_interp.c
102   intern/math_matrix.c
103   intern/math_rotation.c
104   intern/math_solvers.c
105   intern/math_statistics.c
106   intern/math_time.c
107   intern/math_vec.cc
108   intern/math_vector.c
109   intern/math_vector_inline.c
110   intern/memory_utils.c
111   intern/mesh_boolean.cc
112   intern/mesh_intersect.cc
113   intern/noise.c
114   intern/path_util.c
115   intern/polyfill_2d.c
116   intern/polyfill_2d_beautify.c
117   intern/quadric.c
118   intern/rand.cc
119   intern/rct.c
120   intern/scanfill.c
121   intern/scanfill_utils.c
122   intern/session_uuid.c
123   intern/smallhash.c
124   intern/sort.c
125   intern/sort_utils.c
126   intern/stack.c
127   intern/storage.c
128   intern/string.c
129   intern/string_cursor_utf8.c
130   intern/string_search.cc
131   intern/string_utf8.c
132   intern/string_utils.c
133   intern/system.c
134   intern/task_graph.cc
135   intern/task_iterator.c
136   intern/task_pool.cc
137   intern/task_range.cc
138   intern/task_scheduler.cc
139   intern/threads.cc
140   intern/time.c
141   intern/timecode.c
142   intern/timeit.cc
143   intern/uvproject.c
144   intern/voronoi_2d.c
145   intern/voxel.c
146   intern/winstuff.c
147   intern/winstuff_dir.c
148
149   # Private headers.
150   intern/BLI_mempool_private.h
151
152   # Header as source (included in C files above).
153   intern/kdtree_impl.h
154   intern/list_sort_impl.h
155
156
157   BLI_alloca.h
158   BLI_allocator.hh
159   BLI_args.h
160   BLI_array.h
161   BLI_array.hh
162   BLI_array_store.h
163   BLI_array_store_utils.h
164   BLI_array_utils.h
165   BLI_asan.h
166   BLI_assert.h
167   BLI_astar.h
168   BLI_bitmap.h
169   BLI_bitmap_draw_2d.h
170   BLI_blenlib.h
171   BLI_boxpack_2d.h
172   BLI_buffer.h
173   BLI_color.hh
174   BLI_compiler_attrs.h
175   BLI_compiler_compat.h
176   BLI_compiler_typecheck.h
177   BLI_console.h
178   BLI_convexhull_2d.h
179   BLI_delaunay_2d.h
180   BLI_dial_2d.h
181   BLI_disjoint_set.hh
182   BLI_dlrbTree.h
183   BLI_dot_export.hh
184   BLI_dot_export_attribute_enums.hh
185   BLI_double2.hh
186   BLI_double3.hh
187   BLI_dynlib.h
188   BLI_dynstr.h
189   BLI_easing.h
190   BLI_edgehash.h
191   BLI_endian_defines.h
192   BLI_endian_switch.h
193   BLI_endian_switch_inline.h
194   BLI_enumerable_thread_specific.hh
195   BLI_expr_pylike_eval.h
196   BLI_fileops.h
197   BLI_fileops_types.h
198   BLI_float2.hh
199   BLI_float3.hh
200   BLI_float4x4.hh
201   BLI_fnmatch.h
202   BLI_function_ref.hh
203   BLI_ghash.h
204   BLI_gsqueue.h
205   BLI_hash.h
206   BLI_hash.hh
207   BLI_hash_md5.h
208   BLI_hash_mm2a.h
209   BLI_hash_mm3.h
210   BLI_hash_tables.hh
211   BLI_heap.h
212   BLI_heap_simple.h
213   BLI_index_mask.hh
214   BLI_index_range.hh
215   BLI_inplace_priority_queue.hh
216   BLI_iterator.h
217   BLI_jitter_2d.h
218   BLI_kdopbvh.h
219   BLI_kdtree.h
220   BLI_kdtree_impl.h
221   BLI_lasso_2d.h
222   BLI_linear_allocator.hh
223   BLI_link_utils.h
224   BLI_linklist.h
225   BLI_linklist_lockfree.h
226   BLI_linklist_stack.h
227   BLI_listbase.h
228   BLI_listbase_wrapper.hh
229   BLI_map.hh
230   BLI_map_slots.hh
231   BLI_math.h
232   BLI_math_base.h
233   BLI_math_base_safe.h
234   BLI_math_bits.h
235   BLI_math_boolean.hh
236   BLI_math_color.h
237   BLI_math_color_blend.h
238   BLI_math_geom.h
239   BLI_math_inline.h
240   BLI_math_interp.h
241   BLI_math_matrix.h
242   BLI_math_mpq.hh
243   BLI_math_rotation.h
244   BLI_math_solvers.h
245   BLI_math_statistics.h
246   BLI_math_time.h
247   BLI_math_vector.h
248   BLI_memarena.h
249   BLI_memblock.h
250   BLI_memiter.h
251   BLI_memory_utils.h
252   BLI_memory_utils.hh
253   BLI_mempool.h
254   BLI_mesh_boolean.hh
255   BLI_mesh_intersect.hh
256   BLI_mmap.h
257   BLI_mpq2.hh
258   BLI_mpq3.hh
259   BLI_multi_value_map.hh
260   BLI_noise.h
261   BLI_path_util.h
262   BLI_polyfill_2d.h
263   BLI_polyfill_2d_beautify.h
264   BLI_probing_strategies.hh
265   BLI_quadric.h
266   BLI_rand.h
267   BLI_rand.hh
268   BLI_rect.h
269   BLI_resource_scope.hh
270   BLI_scanfill.h
271   BLI_session_uuid.h
272   BLI_set.hh
273   BLI_set_slots.hh
274   BLI_simd.h
275   BLI_smallhash.h
276   BLI_sort.h
277   BLI_sort_utils.h
278   BLI_span.hh
279   BLI_stack.h
280   BLI_stack.hh
281   BLI_strict_flags.h
282   BLI_string.h
283   BLI_string_cursor_utf8.h
284   BLI_string_ref.hh
285   BLI_string_search.h
286   BLI_string_utf8.h
287   BLI_string_utils.h
288   BLI_sys_types.h
289   BLI_system.h
290   BLI_task.h
291   BLI_task.hh
292   BLI_threads.h
293   BLI_timecode.h
294   BLI_timeit.hh
295   BLI_timer.h
296   BLI_user_counter.hh
297   BLI_utildefines.h
298   BLI_utildefines_iter.h
299   BLI_utildefines_stack.h
300   BLI_utildefines_variadic.h
301   BLI_utility_mixins.hh
302   BLI_uvproject.h
303   BLI_vector.hh
304   BLI_vector_adaptor.hh
305   BLI_vector_set.hh
306   BLI_vector_set_slots.hh
307   BLI_vfontdata.h
308   BLI_virtual_array.hh
309   BLI_virtual_vector_array.hh
310   BLI_voronoi_2d.h
311   BLI_voxel.h
312   BLI_winstuff.h
313   PIL_time.h
314   PIL_time_utildefines.h
315 )
316
317 set(LIB
318   bf_intern_eigen
319   bf_intern_guardedalloc
320   bf_intern_numaapi
321   extern_wcwidth
322
323   ${FREETYPE_LIBRARY}
324   ${ZLIB_LIBRARIES}
325 )
326
327 if(WITH_MEM_VALGRIND)
328   add_definitions(-DWITH_MEM_VALGRIND)
329 endif()
330
331 if(WITH_TBB)
332   add_definitions(-DWITH_TBB)
333
334   list(APPEND INC_SYS
335     ${TBB_INCLUDE_DIRS}
336   )
337
338   list(APPEND LIB
339     ${TBB_LIBRARIES}
340   )
341 endif()
342
343 if(WITH_GMP)
344   add_definitions(-DWITH_GMP)
345
346   list(APPEND INC_SYS
347     ${GMP_INCLUDE_DIRS}
348   )
349
350   list(APPEND LIB
351     ${GMP_LIBRARIES}
352   )
353 endif()
354
355 if(WIN32)
356   list(APPEND INC
357     ../../../intern/utfconv
358   )
359   list(APPEND LIB
360     bf_intern_utfconv
361   )
362   list(APPEND SRC
363     intern/system_win32.c
364   )
365 endif()
366
367
368 if(APPLE)
369   list(APPEND SRC
370     intern/storage_apple.mm
371   )
372 endif()
373
374 if(UNIX AND NOT APPLE)
375   list(APPEND LIB
376     bf_intern_libc_compat
377   )
378 endif()
379
380 # no need to compile object files for inline headers.
381 set_source_files_properties(
382   intern/math_base_inline.c
383   intern/math_base_safe_inline.c
384   intern/math_bits_inline.c
385   intern/math_color_blend_inline.c
386   intern/math_color_inline.c
387   intern/math_geom_inline.c
388   intern/math_vector_inline.c
389   PROPERTIES HEADER_FILE_ONLY TRUE
390 )
391
392 blender_add_lib(bf_blenlib "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
393
394 if(WITH_GTESTS)
395   set(TEST_SRC
396     tests/BLI_array_store_test.cc
397     tests/BLI_array_test.cc
398     tests/BLI_array_utils_test.cc
399     tests/BLI_color_test.cc
400     tests/BLI_delaunay_2d_test.cc
401     tests/BLI_disjoint_set_test.cc
402     tests/BLI_edgehash_test.cc
403     tests/BLI_expr_pylike_eval_test.cc
404     tests/BLI_function_ref_test.cc
405     tests/BLI_ghash_test.cc
406     tests/BLI_hash_mm2a_test.cc
407     tests/BLI_heap_simple_test.cc
408     tests/BLI_heap_test.cc
409     tests/BLI_index_mask_test.cc
410     tests/BLI_index_range_test.cc
411     tests/BLI_inplace_priority_queue_test.cc
412     tests/BLI_kdopbvh_test.cc
413     tests/BLI_linear_allocator_test.cc
414     tests/BLI_linklist_lockfree_test.cc
415     tests/BLI_listbase_test.cc
416     tests/BLI_map_test.cc
417     tests/BLI_math_base_safe_test.cc
418     tests/BLI_math_base_test.cc
419     tests/BLI_math_bits_test.cc
420     tests/BLI_math_color_test.cc
421     tests/BLI_math_geom_test.cc
422     tests/BLI_math_matrix_test.cc
423     tests/BLI_math_rotation_test.cc
424     tests/BLI_math_solvers_test.cc
425     tests/BLI_math_time_test.cc
426     tests/BLI_math_vector_test.cc
427     tests/BLI_memiter_test.cc
428     tests/BLI_memory_utils_test.cc
429     tests/BLI_mesh_boolean_test.cc
430     tests/BLI_mesh_intersect_test.cc
431     tests/BLI_multi_value_map_test.cc
432     tests/BLI_path_util_test.cc
433     tests/BLI_polyfill_2d_test.cc
434     tests/BLI_ressource_strings.h
435     tests/BLI_session_uuid_test.cc
436     tests/BLI_set_test.cc
437     tests/BLI_span_test.cc
438     tests/BLI_stack_cxx_test.cc
439     tests/BLI_stack_test.cc
440     tests/BLI_string_ref_test.cc
441     tests/BLI_string_search_test.cc
442     tests/BLI_string_test.cc
443     tests/BLI_string_utf8_test.cc
444     tests/BLI_task_graph_test.cc
445     tests/BLI_task_test.cc
446     tests/BLI_vector_set_test.cc
447     tests/BLI_vector_test.cc
448     tests/BLI_virtual_array_test.cc
449
450     tests/BLI_exception_safety_test_utils.hh
451   )
452   set(TEST_INC
453     ../imbuf
454   )
455   set(TEST_LIB
456     bf_blenlib
457   )
458   include(GTestTesting)
459   blender_add_test_executable(blenlib "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
460
461   add_subdirectory(tests/performance)
462 endif()