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