code cleanup: correct include paths and comment
[blender.git] / extern / libmv / third_party / ceres / 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) 2012, Blender Foundation
18 # All rights reserved.
19 #
20 # Contributor(s): Blender Foundation,
21 #                 Sergey Sharybin
22 #
23 # ***** END GPL LICENSE BLOCK *****
24
25 # NOTE: This file is automatically generated by bundle.sh script
26 #       If you're doing changes in this file, please update template
27 #       in that script too
28
29 set(INC
30         .
31         ../../../Eigen3
32         include
33         internal
34         ../gflags
35 )
36
37 set(INC_SYS
38 )
39
40 set(SRC
41         internal/ceres/array_utils.cc
42         internal/ceres/block_evaluate_preparer.cc
43         internal/ceres/block_jacobian_writer.cc
44         internal/ceres/block_jacobi_preconditioner.cc
45         internal/ceres/block_random_access_dense_matrix.cc
46         internal/ceres/block_random_access_matrix.cc
47         internal/ceres/block_random_access_sparse_matrix.cc
48         internal/ceres/block_sparse_matrix.cc
49         internal/ceres/block_structure.cc
50         internal/ceres/canonical_views_clustering.cc
51         internal/ceres/cgnr_solver.cc
52         internal/ceres/compressed_row_jacobian_writer.cc
53         internal/ceres/compressed_row_sparse_matrix.cc
54         internal/ceres/conditioned_cost_function.cc
55         internal/ceres/conjugate_gradients_solver.cc
56         internal/ceres/corrector.cc
57         internal/ceres/cxsparse.cc
58         internal/ceres/dense_normal_cholesky_solver.cc
59         internal/ceres/dense_qr_solver.cc
60         internal/ceres/dense_sparse_matrix.cc
61         internal/ceres/detect_structure.cc
62         internal/ceres/dogleg_strategy.cc
63         internal/ceres/evaluator.cc
64         internal/ceres/file.cc
65         internal/ceres/generated/schur_eliminator_d_d_d.cc
66         internal/ceres/gradient_checking_cost_function.cc
67         internal/ceres/implicit_schur_complement.cc
68         internal/ceres/iterative_schur_complement_solver.cc
69         internal/ceres/levenberg_marquardt_strategy.cc
70         internal/ceres/linear_least_squares_problems.cc
71         internal/ceres/linear_operator.cc
72         internal/ceres/linear_solver.cc
73         internal/ceres/local_parameterization.cc
74         internal/ceres/loss_function.cc
75         internal/ceres/normal_prior.cc
76         internal/ceres/partitioned_matrix_view.cc
77         internal/ceres/polynomial_solver.cc
78         internal/ceres/problem.cc
79         internal/ceres/problem_impl.cc
80         internal/ceres/program.cc
81         internal/ceres/residual_block.cc
82         internal/ceres/residual_block_utils.cc
83         internal/ceres/runtime_numeric_diff_cost_function.cc
84         internal/ceres/schur_complement_solver.cc
85         internal/ceres/schur_eliminator.cc
86         internal/ceres/schur_ordering.cc
87         internal/ceres/scratch_evaluate_preparer.cc
88         internal/ceres/solver.cc
89         internal/ceres/solver_impl.cc
90         internal/ceres/sparse_matrix.cc
91         internal/ceres/sparse_normal_cholesky_solver.cc
92         internal/ceres/split.cc
93         internal/ceres/stringprintf.cc
94         internal/ceres/suitesparse.cc
95         internal/ceres/triplet_sparse_matrix.cc
96         internal/ceres/trust_region_minimizer.cc
97         internal/ceres/trust_region_strategy.cc
98         internal/ceres/types.cc
99         internal/ceres/visibility_based_preconditioner.cc
100         internal/ceres/visibility.cc
101
102         include/ceres/autodiff_cost_function.h
103         include/ceres/ceres.h
104         include/ceres/conditioned_cost_function.h
105         include/ceres/cost_function.h
106         include/ceres/crs_matrix.h
107         include/ceres/fpclassify.h
108         include/ceres/internal/autodiff.h
109         include/ceres/internal/eigen.h
110         include/ceres/internal/fixed_array.h
111         include/ceres/internal/macros.h
112         include/ceres/internal/manual_constructor.h
113         include/ceres/internal/port.h
114         include/ceres/internal/scoped_ptr.h
115         include/ceres/iteration_callback.h
116         include/ceres/jet.h
117         include/ceres/local_parameterization.h
118         include/ceres/loss_function.h
119         include/ceres/normal_prior.h
120         include/ceres/numeric_diff_cost_function.h
121         include/ceres/problem.h
122         include/ceres/rotation.h
123         include/ceres/sized_cost_function.h
124         include/ceres/solver.h
125         include/ceres/types.h
126         internal/ceres/array_utils.h
127         internal/ceres/block_evaluate_preparer.h
128         internal/ceres/block_jacobian_writer.h
129         internal/ceres/block_jacobi_preconditioner.h
130         internal/ceres/block_random_access_dense_matrix.h
131         internal/ceres/block_random_access_matrix.h
132         internal/ceres/block_random_access_sparse_matrix.h
133         internal/ceres/block_sparse_matrix.h
134         internal/ceres/block_structure.h
135         internal/ceres/canonical_views_clustering.h
136         internal/ceres/casts.h
137         internal/ceres/cgnr_linear_operator.h
138         internal/ceres/cgnr_solver.h
139         internal/ceres/collections_port.h
140         internal/ceres/compressed_row_jacobian_writer.h
141         internal/ceres/compressed_row_sparse_matrix.h
142         internal/ceres/conjugate_gradients_solver.h
143         internal/ceres/corrector.h
144         internal/ceres/cxsparse.h
145         internal/ceres/dense_jacobian_writer.h
146         internal/ceres/dense_normal_cholesky_solver.h
147         internal/ceres/dense_qr_solver.h
148         internal/ceres/dense_sparse_matrix.h
149         internal/ceres/detect_structure.h
150         internal/ceres/dogleg_strategy.h
151         internal/ceres/evaluator.h
152         internal/ceres/file.h
153         internal/ceres/gradient_checking_cost_function.h
154         internal/ceres/graph_algorithms.h
155         internal/ceres/graph.h
156         internal/ceres/implicit_schur_complement.h
157         internal/ceres/integral_types.h
158         internal/ceres/iterative_schur_complement_solver.h
159         internal/ceres/levenberg_marquardt_strategy.h
160         internal/ceres/linear_least_squares_problems.h
161         internal/ceres/linear_operator.h
162         internal/ceres/linear_solver.h
163         internal/ceres/map_util.h
164         internal/ceres/matrix_proto.h
165         internal/ceres/minimizer.h
166         internal/ceres/mutex.h
167         internal/ceres/parameter_block.h
168         internal/ceres/partitioned_matrix_view.h
169         internal/ceres/polynomial_solver.h
170         internal/ceres/problem_impl.h
171         internal/ceres/program_evaluator.h
172         internal/ceres/program.h
173         internal/ceres/random.h
174         internal/ceres/residual_block.h
175         internal/ceres/residual_block_utils.h
176         internal/ceres/runtime_numeric_diff_cost_function.h
177         internal/ceres/schur_complement_solver.h
178         internal/ceres/schur_eliminator.h
179         internal/ceres/schur_eliminator_impl.h
180         internal/ceres/schur_ordering.h
181         internal/ceres/scratch_evaluate_preparer.h
182         internal/ceres/solver_impl.h
183         internal/ceres/sparse_matrix.h
184         internal/ceres/sparse_normal_cholesky_solver.h
185         internal/ceres/split.h
186         internal/ceres/stl_util.h
187         internal/ceres/stringprintf.h
188         internal/ceres/suitesparse.h
189         internal/ceres/triplet_sparse_matrix.h
190         internal/ceres/trust_region_minimizer.h
191         internal/ceres/trust_region_strategy.h
192         internal/ceres/visibility_based_preconditioner.h
193         internal/ceres/visibility.h
194 )
195
196 #if(FALSE)
197 #       list(APPEND SRC
198 #               internal/ceres/generated/schur_eliminator_2_2_2.cc
199 #               internal/ceres/generated/schur_eliminator_2_2_3.cc
200 #               internal/ceres/generated/schur_eliminator_2_2_4.cc
201 #               internal/ceres/generated/schur_eliminator_2_2_d.cc
202 #               internal/ceres/generated/schur_eliminator_2_3_3.cc
203 #               internal/ceres/generated/schur_eliminator_2_3_4.cc
204 #               internal/ceres/generated/schur_eliminator_2_3_9.cc
205 #               internal/ceres/generated/schur_eliminator_2_3_d.cc
206 #               internal/ceres/generated/schur_eliminator_2_4_3.cc
207 #               internal/ceres/generated/schur_eliminator_2_4_4.cc
208 #               internal/ceres/generated/schur_eliminator_2_4_d.cc
209 #               internal/ceres/generated/schur_eliminator_4_4_2.cc
210 #               internal/ceres/generated/schur_eliminator_4_4_3.cc
211 #               internal/ceres/generated/schur_eliminator_4_4_4.cc
212 #               internal/ceres/generated/schur_eliminator_4_4_d.cc
213 #       )
214 #endif()
215
216 if(WIN32)
217         list(APPEND INC
218                 ../glog/src/windows
219         )
220
221         if(NOT MINGW)
222                 list(APPEND INC
223                         ../msinttypes
224                 )
225         endif()
226 else()
227         list(APPEND INC
228                 ../glog/src
229         )
230 endif()
231
232 add_definitions(
233         -DCERES_HAVE_PTHREAD
234         -DCERES_NO_SUITESPARSE
235         -DCERES_NO_CXSPARSE
236         -DCERES_NO_PROTOCOL_BUFFERS
237         -DCERES_RESTRICT_SCHUR_SPECIALIZATION
238 )
239
240 if(MSVC10)
241         add_definitions(
242                 -D"CERES_HASH_NAMESPACE_START=namespace std {"
243                 -D"CERES_HASH_NAMESPACE_END=}"
244         )
245 else()
246         add_definitions(
247                 -D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
248                 -D"CERES_HASH_NAMESPACE_END=}}"
249         )
250 endif()
251
252 if(APPLE)
253         if(CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.5")
254                 add_definitions(
255                         -DCERES_NO_TR1
256                 )
257         endif()
258 endif()
259
260 blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}")