Fix Windows Build
[blender.git] / intern / 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 # ***** END GPL LICENSE BLOCK *****
20
21 # NOTE: This file is automatically generated by bundle.sh script
22 #       If you're doing changes in this file, please update template
23 #       in that script too
24
25 set(INC
26   .
27 )
28
29 set(INC_SYS
30 )
31
32 set(SRC
33   libmv-capi.h
34 )
35
36 set(LIB
37
38 )
39
40 if(WITH_LIBMV)
41   if(WIN32)
42     add_definitions(-D_USE_MATH_DEFINES)
43   endif()
44   add_definitions(${GFLAGS_DEFINES})
45   add_definitions(${GLOG_DEFINES})
46   add_definitions(${CERES_DEFINES})
47   add_definitions(-DLIBMV_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE})
48
49   list(APPEND INC
50     ${GFLAGS_INCLUDE_DIRS}
51     ${GLOG_INCLUDE_DIRS}
52     ../../extern/ceres/include
53     ../../extern/ceres/config
54     ../guardedalloc
55   )
56
57   list(APPEND INC_SYS
58     ${EIGEN3_INCLUDE_DIRS}
59     ${PNG_INCLUDE_DIRS}
60     ${ZLIB_INCLUDE_DIRS}
61   )
62
63   list(APPEND LIB
64     extern_ceres
65     extern_glog
66   )
67
68   add_definitions(
69     -DWITH_LIBMV_GUARDED_ALLOC
70     -DLIBMV_NO_FAST_DETECTOR=
71   )
72
73   list(APPEND SRC
74     intern/autotrack.cc
75     intern/camera_intrinsics.cc
76     intern/detector.cc
77     intern/frame_accessor.cc
78     intern/homography.cc
79     intern/image.cc
80     intern/logging.cc
81     intern/reconstruction.cc
82     intern/track_region.cc
83     intern/tracks.cc
84     intern/tracksN.cc
85     libmv/autotrack/autotrack.cc
86     libmv/autotrack/predict_tracks.cc
87     libmv/autotrack/tracks.cc
88     libmv/base/aligned_malloc.cc
89     libmv/image/array_nd.cc
90     libmv/image/convolve.cc
91     libmv/multiview/conditioning.cc
92     libmv/multiview/euclidean_resection.cc
93     libmv/multiview/fundamental.cc
94     libmv/multiview/homography.cc
95     libmv/multiview/panography.cc
96     libmv/multiview/panography_kernel.cc
97     libmv/multiview/projection.cc
98     libmv/multiview/triangulation.cc
99     libmv/numeric/numeric.cc
100     libmv/numeric/poly.cc
101     libmv/simple_pipeline/bundle.cc
102     libmv/simple_pipeline/camera_intrinsics.cc
103     libmv/simple_pipeline/detect.cc
104     libmv/simple_pipeline/distortion_models.cc
105     libmv/simple_pipeline/initialize_reconstruction.cc
106     libmv/simple_pipeline/intersect.cc
107     libmv/simple_pipeline/keyframe_selection.cc
108     libmv/simple_pipeline/modal_solver.cc
109     libmv/simple_pipeline/pipeline.cc
110     libmv/simple_pipeline/reconstruction.cc
111     libmv/simple_pipeline/reconstruction_scale.cc
112     libmv/simple_pipeline/resect.cc
113     libmv/simple_pipeline/tracks.cc
114     libmv/tracking/brute_region_tracker.cc
115     libmv/tracking/hybrid_region_tracker.cc
116     libmv/tracking/klt_region_tracker.cc
117     libmv/tracking/pyramid_region_tracker.cc
118     libmv/tracking/retrack_region_tracker.cc
119     libmv/tracking/track_region.cc
120     libmv/tracking/trklt_region_tracker.cc
121
122
123     intern/autotrack.h
124     intern/camera_intrinsics.h
125     intern/detector.h
126     intern/frame_accessor.h
127     intern/homography.h
128     intern/image.h
129     intern/logging.h
130     intern/reconstruction.h
131     intern/track_region.h
132     intern/tracks.h
133     intern/tracksN.h
134     libmv/autotrack/autotrack.h
135     libmv/autotrack/callbacks.h
136     libmv/autotrack/frame_accessor.h
137     libmv/autotrack/marker.h
138     libmv/autotrack/model.h
139     libmv/autotrack/predict_tracks.h
140     libmv/autotrack/quad.h
141     libmv/autotrack/reconstruction.h
142     libmv/autotrack/region.h
143     libmv/autotrack/tracks.h
144     libmv/base/aligned_malloc.h
145     libmv/base/id_generator.h
146     libmv/base/scoped_ptr.h
147     libmv/base/vector.h
148     libmv/base/vector_utils.h
149     libmv/image/array_nd.h
150     libmv/image/convolve.h
151     libmv/image/correlation.h
152     libmv/image/image_converter.h
153     libmv/image/image_drawing.h
154     libmv/image/image.h
155     libmv/image/sample.h
156     libmv/image/tuple.h
157     libmv/logging/logging.h
158     libmv/multiview/conditioning.h
159     libmv/multiview/euclidean_resection.h
160     libmv/multiview/fundamental.h
161     libmv/multiview/homography_error.h
162     libmv/multiview/homography.h
163     libmv/multiview/homography_parameterization.h
164     libmv/multiview/nviewtriangulation.h
165     libmv/multiview/panography.h
166     libmv/multiview/panography_kernel.h
167     libmv/multiview/projection.h
168     libmv/multiview/resection.h
169     libmv/multiview/triangulation.h
170     libmv/multiview/two_view_kernel.h
171     libmv/numeric/dogleg.h
172     libmv/numeric/function_derivative.h
173     libmv/numeric/levenberg_marquardt.h
174     libmv/numeric/numeric.h
175     libmv/numeric/poly.h
176     libmv/simple_pipeline/bundle.h
177     libmv/simple_pipeline/callbacks.h
178     libmv/simple_pipeline/camera_intrinsics.h
179     libmv/simple_pipeline/camera_intrinsics_impl.h
180     libmv/simple_pipeline/detect.h
181     libmv/simple_pipeline/distortion_models.h
182     libmv/simple_pipeline/initialize_reconstruction.h
183     libmv/simple_pipeline/intersect.h
184     libmv/simple_pipeline/keyframe_selection.h
185     libmv/simple_pipeline/modal_solver.h
186     libmv/simple_pipeline/pipeline.h
187     libmv/simple_pipeline/reconstruction.h
188     libmv/simple_pipeline/reconstruction_scale.h
189     libmv/simple_pipeline/resect.h
190     libmv/simple_pipeline/tracks.h
191     libmv/tracking/brute_region_tracker.h
192     libmv/tracking/hybrid_region_tracker.h
193     libmv/tracking/kalman_filter.h
194     libmv/tracking/klt_region_tracker.h
195     libmv/tracking/pyramid_region_tracker.h
196     libmv/tracking/region_tracker.h
197     libmv/tracking/retrack_region_tracker.h
198     libmv/tracking/track_region.h
199     libmv/tracking/trklt_region_tracker.h
200
201     third_party/msinttypes/inttypes.h
202     third_party/msinttypes/stdint.h
203   )
204
205
206   if(WITH_GTESTS)
207     blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "" "" "")
208
209     BLENDER_SRC_GTEST("libmv_predict_tracks" "./libmv/autotrack/predict_tracks_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
210     BLENDER_SRC_GTEST("libmv_tracks" "./libmv/autotrack/tracks_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
211     BLENDER_SRC_GTEST("libmv_scoped_ptr" "./libmv/base/scoped_ptr_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
212     BLENDER_SRC_GTEST("libmv_vector" "./libmv/base/vector_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
213     BLENDER_SRC_GTEST("libmv_array_nd" "./libmv/image/array_nd_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
214     BLENDER_SRC_GTEST("libmv_convolve" "./libmv/image/convolve_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
215     BLENDER_SRC_GTEST("libmv_image" "./libmv/image/image_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
216     BLENDER_SRC_GTEST("libmv_sample" "./libmv/image/sample_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
217     BLENDER_SRC_GTEST("libmv_tuple" "./libmv/image/tuple_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
218     BLENDER_SRC_GTEST("libmv_euclidean_resection" "./libmv/multiview/euclidean_resection_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
219     BLENDER_SRC_GTEST("libmv_fundamental" "./libmv/multiview/fundamental_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
220     BLENDER_SRC_GTEST("libmv_homography" "./libmv/multiview/homography_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
221     BLENDER_SRC_GTEST("libmv_nviewtriangulation" "./libmv/multiview/nviewtriangulation_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
222     BLENDER_SRC_GTEST("libmv_panography" "./libmv/multiview/panography_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
223     BLENDER_SRC_GTEST("libmv_projection" "./libmv/multiview/projection_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
224     BLENDER_SRC_GTEST("libmv_resection" "./libmv/multiview/resection_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
225     BLENDER_SRC_GTEST("libmv_triangulation" "./libmv/multiview/triangulation_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
226     BLENDER_SRC_GTEST("libmv_dogleg" "./libmv/numeric/dogleg_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
227     BLENDER_SRC_GTEST("libmv_function_derivative" "./libmv/numeric/function_derivative_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
228     BLENDER_SRC_GTEST("libmv_levenberg_marquardt" "./libmv/numeric/levenberg_marquardt_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
229     BLENDER_SRC_GTEST("libmv_numeric" "./libmv/numeric/numeric_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
230     BLENDER_SRC_GTEST("libmv_poly" "./libmv/numeric/poly_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
231     BLENDER_SRC_GTEST("libmv_camera_intrinsics" "./libmv/simple_pipeline/camera_intrinsics_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
232     BLENDER_SRC_GTEST("libmv_detect" "./libmv/simple_pipeline/detect_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
233     BLENDER_SRC_GTEST("libmv_intersect" "./libmv/simple_pipeline/intersect_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
234     BLENDER_SRC_GTEST("libmv_keyframe_selection" "./libmv/simple_pipeline/keyframe_selection_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
235     BLENDER_SRC_GTEST("libmv_modal_solver" "./libmv/simple_pipeline/modal_solver_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
236     BLENDER_SRC_GTEST("libmv_resect" "./libmv/simple_pipeline/resect_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
237     BLENDER_SRC_GTEST("libmv_brute_region_tracker" "./libmv/tracking/brute_region_tracker_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
238     BLENDER_SRC_GTEST("libmv_klt_region_tracker" "./libmv/tracking/klt_region_tracker_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
239     BLENDER_SRC_GTEST("libmv_pyramid_region_tracker" "./libmv/tracking/pyramid_region_tracker_test.cc" "libmv_test_dataset;bf_intern_libmv;extern_ceres")
240   endif()
241 else()
242   list(APPEND SRC
243     intern/stub.cc
244   )
245 endif()
246
247 blender_add_lib(bf_intern_libmv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")