Depsgraph: Cleanup and code simplification
[blender-staging.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_pchanmap.cc
47         intern/builder/deg_builder_relations.cc
48         intern/builder/deg_builder_transitive.cc
49         intern/debug/deg_debug_graphviz.cc
50         intern/eval/deg_eval.cc
51         intern/eval/deg_eval_debug.cc
52         intern/eval/deg_eval_flush.cc
53         intern/nodes/deg_node.cc
54         intern/nodes/deg_node_component.cc
55         intern/nodes/deg_node_operation.cc
56         intern/depsgraph.cc
57         intern/depsgraph_build.cc
58         intern/depsgraph_debug.cc
59         intern/depsgraph_eval.cc
60         intern/depsgraph_query.cc
61         intern/depsgraph_tag.cc
62         intern/depsgraph_type_defines.cc
63
64         DEG_depsgraph.h
65         DEG_depsgraph_build.h
66         DEG_depsgraph_debug.h
67         DEG_depsgraph_query.h
68
69         intern/builder/deg_builder.h
70         intern/builder/deg_builder_cycle.h
71         intern/builder/deg_builder_nodes.h
72         intern/builder/deg_builder_pchanmap.h
73         intern/builder/deg_builder_relations.h
74         intern/builder/deg_builder_transitive.h
75         intern/eval/deg_eval.h
76         intern/eval/deg_eval_debug.h
77         intern/eval/deg_eval_flush.h
78         intern/nodes/deg_node.h
79         intern/nodes/deg_node_component.h
80         intern/nodes/deg_node_operation.h
81         intern/depsgraph.h
82         intern/depsgraph_intern.h
83         intern/depsgraph_types.h
84
85         util/deg_util_function.h
86         util/deg_util_hash.h
87 )
88
89 if(WITH_CXX11)
90         add_definitions(-DDEG_STD_UNORDERED_MAP)
91 elseif(HAVE_STD_UNORDERED_MAP_HEADER)
92         if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
93                 add_definitions(-DDEG_STD_UNORDERED_MAP)
94         else()
95                 if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
96                         add_definitions(-DDEG_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
97                 else()
98                         add_definitions(-DDEG_NO_UNORDERED_MAP)
99                         message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
100                 endif()
101         endif()
102 else()
103         if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
104                 add_definitions(-DDEG_TR1_UNORDERED_MAP)
105         else()
106                 add_definitions(-DDEG_NO_UNORDERED_MAP)
107                 message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
108         endif()
109 endif()
110
111 if(WITH_LEGACY_DEPSGRAPH)
112         add_definitions(-DWITH_LEGACY_DEPSGRAPH)
113 endif()
114
115 if(WITH_BOOST)
116         list(APPEND INC_SYS
117                 ${BOOST_INCLUDE_DIR}
118         )
119         add_definitions(-DHAVE_BOOST_FUNCTION_BINDINGS)
120 endif()
121
122 if(WITH_OPENSUBDIV)
123         add_definitions(-DWITH_OPENSUBDIV)
124 endif()
125
126 blender_add_lib(bf_depsgraph "${SRC}" "${INC}" "${INC_SYS}")