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