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