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