Merge branch 'master' into blender2.8
[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         ../blenkernel
29         ../blenlib
30         ../bmesh
31         ../makesdna
32         ../makesrna
33         ../modifiers
34         ../windowmanager
35         ../../../intern/atomic
36         ../../../intern/guardedalloc
37 )
38
39 set(INC_SYS
40 )
41
42 set(SRC
43         intern/builder/deg_builder.cc
44         intern/builder/deg_builder_cycle.cc
45         intern/builder/deg_builder_nodes.cc
46         intern/builder/deg_builder_nodes_layer_collection.cc
47         intern/builder/deg_builder_nodes_rig.cc
48         intern/builder/deg_builder_nodes_view_layer.cc
49         intern/builder/deg_builder_pchanmap.cc
50         intern/builder/deg_builder_relations.cc
51         intern/builder/deg_builder_relations_keys.cc
52         intern/builder/deg_builder_relations_layer_collection.cc
53         intern/builder/deg_builder_relations_rig.cc
54         intern/builder/deg_builder_relations_view_layer.cc
55         intern/builder/deg_builder_transitive.cc
56         intern/debug/deg_debug_relations_graphviz.cc
57         intern/debug/deg_debug_stats_gnuplot.cc
58         intern/eval/deg_eval.cc
59         intern/eval/deg_eval_copy_on_write.cc
60         intern/eval/deg_eval_flush.cc
61         intern/eval/deg_eval_stats.cc
62         intern/nodes/deg_node.cc
63         intern/nodes/deg_node_component.cc
64         intern/nodes/deg_node_id.cc
65         intern/nodes/deg_node_operation.cc
66         intern/nodes/deg_node_time.cc
67         intern/depsgraph.cc
68         intern/depsgraph_build.cc
69         intern/depsgraph_debug.cc
70         intern/depsgraph_eval.cc
71         intern/depsgraph_query.cc
72         intern/depsgraph_query_foreach.cc
73         intern/depsgraph_query_iter.cc
74         intern/depsgraph_tag.cc
75         intern/depsgraph_type_defines.cc
76
77         DEG_depsgraph.h
78         DEG_depsgraph_build.h
79         DEG_depsgraph_debug.h
80         DEG_depsgraph_query.h
81
82         intern/builder/deg_builder.h
83         intern/builder/deg_builder_cycle.h
84         intern/builder/deg_builder_nodes.h
85         intern/builder/deg_builder_pchanmap.h
86         intern/builder/deg_builder_relations.h
87         intern/builder/deg_builder_relations_impl.h
88         intern/builder/deg_builder_transitive.h
89         intern/eval/deg_eval.h
90         intern/eval/deg_eval_copy_on_write.h
91         intern/eval/deg_eval_flush.h
92         intern/eval/deg_eval_stats.h
93         intern/nodes/deg_node.h
94         intern/nodes/deg_node_component.h
95         intern/nodes/deg_node_id.h
96         intern/nodes/deg_node_operation.h
97         intern/nodes/deg_node_time.h
98         intern/depsgraph.h
99         intern/depsgraph_intern.h
100         intern/depsgraph_types.h
101
102         util/deg_util_foreach.h
103         util/deg_util_function.h
104 )
105
106 if(WITH_CXX11)
107         add_definitions(-DDEG_STD_UNORDERED_MAP)
108 elseif(HAVE_STD_UNORDERED_MAP_HEADER)
109         if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
110                 add_definitions(-DDEG_STD_UNORDERED_MAP)
111         else()
112                 if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
113                         add_definitions(-DDEG_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
114                 else()
115                         add_definitions(-DDEG_NO_UNORDERED_MAP)
116                         message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
117                 endif()
118         endif()
119 else()
120         if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
121                 add_definitions(-DDEG_TR1_UNORDERED_MAP)
122         else()
123                 add_definitions(-DDEG_NO_UNORDERED_MAP)
124                 message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
125         endif()
126 endif()
127
128 if(WITH_BOOST)
129         list(APPEND INC_SYS
130                 ${BOOST_INCLUDE_DIR}
131         )
132         add_definitions(-DHAVE_BOOST_FUNCTION_BINDINGS)
133 endif()
134
135 if(WITH_OPENSUBDIV)
136         add_definitions(-DWITH_OPENSUBDIV)
137 endif()
138
139 blender_add_lib(bf_depsgraph "${SRC}" "${INC}" "${INC_SYS}")