Camera tracking: merge hybrid tracker from tomato branch
[blender.git] / extern / libmv / 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16 #
17 # The Original Code is Copyright (C) 2011, Blender Foundation
18 # All rights reserved.
19 #
20 # Contributor(s): Blender Foundation,
21 #                 Sergey Sharybin
22 #
23 # ***** END GPL LICENSE BLOCK *****
24
25 set(INC
26         .
27         ../Eigen3
28         third_party/ssba
29         third_party/ldl/Include
30         ../colamd/Include
31 )
32
33 set(INC_SYS
34         ${PNG_INCLUDE_DIR}
35         ${ZLIB_INCLUDE_DIRS}
36 )
37
38 set(SRC
39         libmv-capi.cpp
40         libmv/numeric/numeric.cc
41         libmv/numeric/poly.cc
42         libmv/simple_pipeline/callbacks.cc
43         libmv/simple_pipeline/reconstruction.cc
44         libmv/simple_pipeline/resect.cc
45         libmv/simple_pipeline/intersect.cc
46         libmv/simple_pipeline/initialize_reconstruction.cc
47         libmv/simple_pipeline/camera_intrinsics.cc
48         libmv/simple_pipeline/pipeline.cc
49         libmv/simple_pipeline/detect.cc
50         libmv/simple_pipeline/tracks.cc
51         libmv/simple_pipeline/bundle.cc
52         libmv/image/convolve.cc
53         libmv/image/array_nd.cc
54         libmv/tracking/pyramid_region_tracker.cc
55         libmv/tracking/sad.cc
56         libmv/tracking/brute_region_tracker.cc
57         libmv/tracking/hybrid_region_tracker.cc
58         libmv/tracking/esm_region_tracker.cc
59         libmv/tracking/trklt_region_tracker.cc
60         libmv/tracking/klt_region_tracker.cc
61         libmv/tracking/lmicklt_region_tracker.cc
62         libmv/tracking/retrack_region_tracker.cc
63         libmv/multiview/projection.cc
64         libmv/multiview/conditioning.cc
65         libmv/multiview/fundamental.cc
66         libmv/multiview/euclidean_resection.cc
67         libmv/multiview/triangulation.cc
68
69         third_party/ssba/Geometry/v3d_metricbundle.cpp
70         third_party/ssba/Math/v3d_optimization.cpp
71         third_party/gflags/gflags.cc
72         third_party/gflags/gflags_reporting.cc
73         third_party/gflags/gflags_completions.cc
74         third_party/fast/fast_9.c
75         third_party/fast/fast_10.c
76         third_party/fast/fast_11.c
77         third_party/fast/fast_12.c
78         third_party/fast/fast.c
79         third_party/fast/nonmax.c
80         third_party/ldl/Source/ldl.c
81
82         libmv-capi.h
83         libmv/logging/logging.h
84         libmv/numeric/dogleg.h
85         libmv/numeric/levenberg_marquardt.h
86         libmv/numeric/poly.h
87         libmv/numeric/function_derivative.h
88         libmv/numeric/numeric.h
89         libmv/simple_pipeline/callbacks.h
90         libmv/simple_pipeline/resect.h
91         libmv/simple_pipeline/reconstruction.h
92         libmv/simple_pipeline/camera_intrinsics.h
93         libmv/simple_pipeline/tracks.h
94         libmv/simple_pipeline/detect.h
95         libmv/simple_pipeline/pipeline.h
96         libmv/simple_pipeline/intersect.h
97         libmv/simple_pipeline/bundle.h
98         libmv/simple_pipeline/initialize_reconstruction.h
99         libmv/image/convolve.h
100         libmv/image/tuple.h
101         libmv/image/array_nd.h
102         libmv/image/sample.h
103         libmv/image/image.h
104         libmv/tracking/region_tracker.h
105         libmv/tracking/brute_region_tracker.h
106         libmv/tracking/hybrid_region_tracker.h
107         libmv/tracking/retrack_region_tracker.h
108         libmv/tracking/sad.h
109         libmv/tracking/pyramid_region_tracker.h
110         libmv/tracking/esm_region_tracker.h
111         libmv/tracking/trklt_region_tracker.h
112         libmv/tracking/klt_region_tracker.h
113         libmv/tracking/lmicklt_region_tracker.h
114         libmv/base/id_generator.h
115         libmv/base/vector.h
116         libmv/base/scoped_ptr.h
117         libmv/base/vector_utils.h
118         libmv/multiview/nviewtriangulation.h
119         libmv/multiview/resection.h
120         libmv/multiview/euclidean_resection.h
121         libmv/multiview/triangulation.h
122         libmv/multiview/projection.h
123         libmv/multiview/fundamental.h
124         libmv/multiview/conditioning.h
125
126         third_party/ssba/Geometry/v3d_metricbundle.h
127         third_party/ssba/Geometry/v3d_cameramatrix.h
128         third_party/ssba/Geometry/v3d_distortion.h
129         third_party/ssba/Math/v3d_linear_utils.h
130         third_party/ssba/Math/v3d_optimization.h
131         third_party/ssba/Math/v3d_mathutilities.h
132         third_party/ssba/Math/v3d_linear.h
133         third_party/gflags/gflags_completions.h
134         third_party/gflags/mutex.h
135         third_party/gflags/config.h
136         third_party/gflags/gflags.h
137         third_party/fast/fast.h
138         third_party/ldl/Include/ldl.h
139         third_party/msinttypes/stdint.h
140         third_party/msinttypes/inttypes.h
141 )
142
143 if(WIN32)
144         list(APPEND SRC
145                 third_party/glog/src/logging.cc
146                 third_party/glog/src/raw_logging.cc
147                 third_party/glog/src/utilities.cc
148                 third_party/glog/src/vlog_is_on.cc
149                 third_party/glog/src/windows/port.cc
150
151                 third_party/glog/src/utilities.h
152                 third_party/glog/src/stacktrace_generic-inl.h
153                 third_party/glog/src/stacktrace.h
154                 third_party/glog/src/stacktrace_x86_64-inl.h
155                 third_party/glog/src/base/googleinit.h
156                 third_party/glog/src/base/mutex.h
157                 third_party/glog/src/base/commandlineflags.h
158                 third_party/glog/src/stacktrace_powerpc-inl.h
159                 third_party/glog/src/stacktrace_x86-inl.h
160                 third_party/glog/src/config.h
161                 third_party/glog/src/stacktrace_libunwind-inl.h
162                 third_party/glog/src/windows/glog/raw_logging.h
163                 third_party/glog/src/windows/glog/vlog_is_on.h
164                 third_party/glog/src/windows/glog/logging.h
165                 third_party/glog/src/windows/glog/log_severity.h
166                 third_party/glog/src/windows/port.h
167                 third_party/glog/src/windows/config.h
168         )
169
170         list(APPEND INC
171                 third_party/glog/src/windows
172         )
173
174         if(NOT MINGW)
175                 list(APPEND INC
176                         third_party/msinttypes
177                 )
178         endif()
179
180         if(MSVC)
181                 set(MSVC_OFLAGS O1 O2 Ox)
182                 foreach(FLAG ${MSVC_OFLAGS})
183                         string(REPLACE "${FLAG}" "Od" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
184                         string(REPLACE "${FLAG}" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
185                 endforeach()
186         endif()
187 else(WIN32)
188         list(APPEND SRC
189                 third_party/glog/src/utilities.cc
190                 third_party/glog/src/symbolize.cc
191                 third_party/glog/src/vlog_is_on.cc
192                 third_party/glog/src/signalhandler.cc
193                 third_party/glog/src/logging.cc
194                 third_party/glog/src/demangle.cc
195                 third_party/glog/src/raw_logging.cc
196
197                 third_party/glog/src/utilities.h
198                 third_party/glog/src/stacktrace_generic-inl.h
199                 third_party/glog/src/config_mac.h
200                 third_party/glog/src/stacktrace.h
201                 third_party/glog/src/stacktrace_x86_64-inl.h
202                 third_party/glog/src/symbolize.h
203                 third_party/glog/src/base/googleinit.h
204                 third_party/glog/src/base/mutex.h
205                 third_party/glog/src/base/commandlineflags.h
206                 third_party/glog/src/stacktrace_powerpc-inl.h
207                 third_party/glog/src/stacktrace_x86-inl.h
208                 third_party/glog/src/config.h
209                 third_party/glog/src/demangle.h
210                 third_party/glog/src/stacktrace_libunwind-inl.h
211                 third_party/glog/src/glog/raw_logging.h
212                 third_party/glog/src/glog/vlog_is_on.h
213                 third_party/glog/src/glog/logging.h
214                 third_party/glog/src/glog/log_severity.h
215                 third_party/glog/src/config_linux.h
216         )
217
218         list(APPEND INC
219                 third_party/glog/src
220         )
221 endif()
222
223 add_definitions(-DV3DLIB_ENABLE_SUITESPARSE -DGOOGLE_GLOG_DLL_DECL=)
224
225 blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}")