Update Ceres to latest upstream version
[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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 # 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 )
32
33 set(SRC
34         libmv-capi.h
35         libmv-capi_intern.h
36 )
37
38 if(WITH_LIBMV)
39         add_definitions(
40                 -DWITH_LIBMV
41                 -DWITH_LIBMV_GUARDED_ALLOC
42                 -DGOOGLE_GLOG_DLL_DECL=
43         )
44
45         list(APPEND INC
46                 third_party/ceres/include
47                 ../../intern/guardedalloc
48         )
49
50         set(INC_SYS
51                 ../Eigen3
52                 ${PNG_INCLUDE_DIR}
53                 ${ZLIB_INCLUDE_DIRS}
54         )
55
56         list(APPEND SRC
57                 libmv-capi.cc
58                 libmv/image/array_nd.cc
59                 libmv/image/convolve.cc
60                 libmv/multiview/conditioning.cc
61                 libmv/multiview/euclidean_resection.cc
62                 libmv/multiview/fundamental.cc
63                 libmv/multiview/homography.cc
64                 libmv/multiview/panography.cc
65                 libmv/multiview/projection.cc
66                 libmv/multiview/triangulation.cc
67                 libmv/numeric/numeric.cc
68                 libmv/numeric/poly.cc
69                 libmv/simple_pipeline/bundle.cc
70                 libmv/simple_pipeline/camera_intrinsics.cc
71                 libmv/simple_pipeline/detect.cc
72                 libmv/simple_pipeline/initialize_reconstruction.cc
73                 libmv/simple_pipeline/intersect.cc
74                 libmv/simple_pipeline/keyframe_selection.cc
75                 libmv/simple_pipeline/modal_solver.cc
76                 libmv/simple_pipeline/pipeline.cc
77                 libmv/simple_pipeline/reconstruction.cc
78                 libmv/simple_pipeline/reconstruction_scale.cc
79                 libmv/simple_pipeline/resect.cc
80                 libmv/simple_pipeline/tracks.cc
81                 libmv/tracking/brute_region_tracker.cc
82                 libmv/tracking/hybrid_region_tracker.cc
83                 libmv/tracking/klt_region_tracker.cc
84                 libmv/tracking/pyramid_region_tracker.cc
85                 libmv/tracking/retrack_region_tracker.cc
86                 libmv/tracking/track_region.cc
87                 libmv/tracking/trklt_region_tracker.cc
88
89                 third_party/fast/fast_10.c
90                 third_party/fast/fast_11.c
91                 third_party/fast/fast_12.c
92                 third_party/fast/fast_9.c
93                 third_party/fast/fast.c
94                 third_party/fast/nonmax.c
95                 third_party/gflags/gflags.cc
96                 third_party/gflags/gflags_completions.cc
97                 third_party/gflags/gflags_reporting.cc
98
99                 libmv/base/id_generator.h
100                 libmv/base/scoped_ptr.h
101                 libmv/base/vector.h
102                 libmv/base/vector_utils.h
103                 libmv/image/array_nd.h
104                 libmv/image/convolve.h
105                 libmv/image/correlation.h
106                 libmv/image/image.h
107                 libmv/image/sample.h
108                 libmv/image/tuple.h
109                 libmv/logging/logging.h
110                 libmv/multiview/conditioning.h
111                 libmv/multiview/euclidean_resection.h
112                 libmv/multiview/fundamental.h
113                 libmv/multiview/homography.h
114                 libmv/multiview/homography_parameterization.h
115                 libmv/multiview/nviewtriangulation.h
116                 libmv/multiview/panography.h
117                 libmv/multiview/projection.h
118                 libmv/multiview/resection.h
119                 libmv/multiview/triangulation.h
120                 libmv/numeric/dogleg.h
121                 libmv/numeric/function_derivative.h
122                 libmv/numeric/levenberg_marquardt.h
123                 libmv/numeric/numeric.h
124                 libmv/numeric/poly.h
125                 libmv/simple_pipeline/bundle.h
126                 libmv/simple_pipeline/callbacks.h
127                 libmv/simple_pipeline/camera_intrinsics.h
128                 libmv/simple_pipeline/detect.h
129                 libmv/simple_pipeline/initialize_reconstruction.h
130                 libmv/simple_pipeline/intersect.h
131                 libmv/simple_pipeline/keyframe_selection.h
132                 libmv/simple_pipeline/modal_solver.h
133                 libmv/simple_pipeline/pipeline.h
134                 libmv/simple_pipeline/reconstruction.h
135                 libmv/simple_pipeline/reconstruction_scale.h
136                 libmv/simple_pipeline/resect.h
137                 libmv/simple_pipeline/tracks.h
138                 libmv/tracking/brute_region_tracker.h
139                 libmv/tracking/hybrid_region_tracker.h
140                 libmv/tracking/klt_region_tracker.h
141                 libmv/tracking/pyramid_region_tracker.h
142                 libmv/tracking/region_tracker.h
143                 libmv/tracking/retrack_region_tracker.h
144                 libmv/tracking/track_region.h
145                 libmv/tracking/trklt_region_tracker.h
146
147                 third_party/fast/fast.h
148                 third_party/gflags/config.h
149                 third_party/gflags/gflags/gflags_completions.h
150                 third_party/gflags/gflags/gflags_declare.h
151                 third_party/gflags/gflags/gflags.h
152                 third_party/gflags/mutex.h
153                 third_party/gflags/util.h
154                 third_party/msinttypes/inttypes.h
155                 third_party/msinttypes/stdint.h
156         )
157
158         if(WIN32)
159                 list(APPEND SRC
160                         third_party/glog/src/logging.cc
161                         third_party/glog/src/raw_logging.cc
162                         third_party/glog/src/utilities.cc
163                         third_party/glog/src/vlog_is_on.cc
164                         third_party/glog/src/windows/port.cc
165
166                         third_party/glog/src/utilities.h
167                         third_party/glog/src/stacktrace_generic-inl.h
168                         third_party/glog/src/stacktrace.h
169                         third_party/glog/src/stacktrace_x86_64-inl.h
170                         third_party/glog/src/base/googleinit.h
171                         third_party/glog/src/base/mutex.h
172                         third_party/glog/src/base/commandlineflags.h
173                         third_party/glog/src/stacktrace_powerpc-inl.h
174                         third_party/glog/src/stacktrace_x86-inl.h
175                         third_party/glog/src/config.h
176                         third_party/glog/src/stacktrace_libunwind-inl.h
177                         third_party/glog/src/windows/glog/raw_logging.h
178                         third_party/glog/src/windows/glog/vlog_is_on.h
179                         third_party/glog/src/windows/glog/logging.h
180                         third_party/glog/src/windows/glog/log_severity.h
181                         third_party/glog/src/windows/port.h
182                         third_party/glog/src/windows/config.h
183                 )
184
185                 list(APPEND INC
186                         third_party/glog/src/windows
187                 )
188
189                 if(NOT MINGW)
190                         list(APPEND INC
191                                 third_party/msinttypes
192                         )
193                 endif()
194         else()
195                 list(APPEND SRC
196                         third_party/glog/src/demangle.cc
197                         third_party/glog/src/logging.cc
198                         third_party/glog/src/raw_logging.cc
199                         third_party/glog/src/signalhandler.cc
200                         third_party/glog/src/symbolize.cc
201                         third_party/glog/src/utilities.cc
202                         third_party/glog/src/vlog_is_on.cc
203
204                         third_party/glog/src/base/commandlineflags.h
205                         third_party/glog/src/base/googleinit.h
206                         third_party/glog/src/base/mutex.h
207                         third_party/glog/src/config_freebsd.h
208                         third_party/glog/src/config.h
209                         third_party/glog/src/config_hurd.h
210                         third_party/glog/src/config_linux.h
211                         third_party/glog/src/config_mac.h
212                         third_party/glog/src/demangle.h
213                         third_party/glog/src/glog/logging.h
214                         third_party/glog/src/glog/log_severity.h
215                         third_party/glog/src/glog/raw_logging.h
216                         third_party/glog/src/glog/vlog_is_on.h
217                         third_party/glog/src/stacktrace_generic-inl.h
218                         third_party/glog/src/stacktrace.h
219                         third_party/glog/src/stacktrace_libunwind-inl.h
220                         third_party/glog/src/stacktrace_powerpc-inl.h
221                         third_party/glog/src/stacktrace_x86_64-inl.h
222                         third_party/glog/src/stacktrace_x86-inl.h
223                         third_party/glog/src/symbolize.h
224                         third_party/glog/src/utilities.h
225                 )
226
227                 list(APPEND INC
228                         third_party/glog/src
229                 )
230         endif()
231 else()
232         list(APPEND SRC
233                 libmv-capi_stub.cc
234         )
235 endif()
236
237 blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}")
238
239 if(WITH_LIBMV)
240         add_subdirectory(third_party)
241 endif()