Depsgraph: New dependency graph integration commit
[blender.git] / source / blender / depsgraph / 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) 2014, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Joshua Leung, Lukas Toenne
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 set(INC
27         .
28         ./intern
29         ./util
30         ../blenkernel
31         ../blenlib
32         ../bmesh
33         ../makesdna
34         ../makesrna
35         ../modifiers
36         ../windowmanager
37         ../../../intern/atomic
38         ../../../intern/guardedalloc
39 )
40
41 set(INC_SYS
42 )
43
44 set(SRC
45         intern/depsgraph.cc
46         intern/depsnode.cc
47         intern/depsnode_component.cc
48         intern/depsnode_operation.cc
49         intern/depsgraph_build.cc
50         intern/depsgraph_build_nodes.cc
51         intern/depsgraph_build_relations.cc
52         intern/depsgraph_debug.cc
53         intern/depsgraph_eval.cc
54         intern/depsgraph_query.cc
55         intern/depsgraph_queue.cc
56         intern/depsgraph_tag.cc
57         intern/depsgraph_type_defines.cc
58         util/depsgraph_util_cycle.cc
59         util/depsgraph_util_pchanmap.cc
60         util/depsgraph_util_transitive.cc
61
62         DEG_depsgraph.h
63         DEG_depsgraph_build.h
64         DEG_depsgraph_debug.h
65         DEG_depsgraph_query.h
66         intern/depsgraph.h
67         intern/depsnode.h
68         intern/depsnode_component.h
69         intern/depsnode_operation.h
70         intern/depsnode_opcodes.h
71         intern/depsgraph_build.h
72         intern/depsgraph_debug.h
73         intern/depsgraph_intern.h
74         intern/depsgraph_queue.h
75         intern/depsgraph_types.h
76
77         util/depsgraph_util_cycle.h
78         util/depsgraph_util_function.h
79         util/depsgraph_util_hash.h
80         util/depsgraph_util_map.h
81         util/depsgraph_util_pchanmap.h
82         util/depsgraph_util_set.h
83         util/depsgraph_util_transitive.h
84 )
85
86 TEST_UNORDERED_MAP_SUPPORT()
87 if(HAVE_STD_UNORDERED_MAP_HEADER)
88         if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
89                 add_definitions(-DDEG_STD_UNORDERED_MAP)
90         else()
91                 if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
92                         add_definitions(-DDEG_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
93                 else()
94                         add_definitions(-DDEG_NO_UNORDERED_MAP)
95                         message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
96                 endif()
97         endif()
98 else()
99         if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
100                 add_definitions(-DDEG_TR1_UNORDERED_MAP)
101         else()
102                 add_definitions(-DDEG_NO_UNORDERED_MAP)
103                 message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
104         endif()
105 endif()
106
107 if(WITH_LEGACY_DEPSGRAPH)
108         add_definitions(-DWITH_LEGACY_DEPSGRAPH)
109 endif()
110
111 if(WITH_BOOST)
112         list(APPEND INC_SYS ${BOOST_INCLUDE_DIR})
113         add_definitions(-DHAVE_BOOST_FUNCTION_BINDINGS)
114 endif()
115
116 blender_add_lib(bf_depsgraph "${SRC}" "${INC}" "${INC_SYS}")