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