3 if [ "x$1" = "x--i-really-know-what-im-doing" ] ; then
4 echo Proceeding as requested by command line ...
6 echo "*** Please run again with --i-really-know-what-im-doing ..."
12 repo="git://git.blender.org/libmv.git"
15 git clone -b $BRANCH $repo $tmp/libmv
17 git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log -n 50 > ChangeLog
19 find libmv -type f -exec rm -rf {} \;
20 find third_party -type f -exec rm -rf {} \;
22 cat "files.txt" | while read f; do
24 cp $tmp/libmv/src/$f $f
29 sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v _test.cc | grep -v test_data_sets | sed -r 's/^\.\//\t\t/' | sort -d`
30 headers=`find ./libmv -type f -iname '*.h' | grep -v test_data_sets | sed -r 's/^\.\//\t\t/' | sort -d`
32 third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t\t/' | sort -d`
33 third_headers=`find ./third_party -type f -iname '*.h' | sed -r 's/^\.\//\t\t/' | sort -d`
35 tests=`find ./libmv -type f -iname '*_test.cc' | sort -d | awk ' { name=gensub(".*/([A-Za-z_]+)_test.cc", "\\\\1", $1); printf("\t\tBLENDER_SRC_GTEST(\"libmv_%s\" \"%s\" \"libmv_test_dataset;bf_intern_libmv;extern_ceres\")\n", name, $1) } '`
37 src_dir=`find ./libmv -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t\t/' | sort -d | uniq`
38 src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t\t/' | sort -d | uniq`
41 for x in $src_dir $src_third_dir; do
44 if stat $x/*.cpp > /dev/null 2>&1; then
45 t=" src += env.Glob('`echo $x'/*.cpp'`')"
48 if stat $x/*.c > /dev/null 2>&1; then
50 t=" src += env.Glob('`echo $x'/*.c'`')"
52 t="$t + env.Glob('`echo $x'/*.c'`')"
56 if stat $x/*.cc > /dev/null 2>&1; then
58 t=" src += env.Glob('`echo $x'/*.cc'`')"
60 t="$t + env.Glob('`echo $x'/*.cc'`')"
64 if test `echo $x | grep -c "windows\|gflags" ` -eq 0; then
65 if [ -z "$src" ]; then
71 if [ -z "$win_src" ]; then
74 win_src=`echo "$win_src\n $t"`
79 cat > CMakeLists.txt << EOF
80 # ***** BEGIN GPL LICENSE BLOCK *****
82 # This program is free software; you can redistribute it and/or
83 # modify it under the terms of the GNU General Public License
84 # as published by the Free Software Foundation; either version 2
85 # of the License, or (at your option) any later version.
87 # This program is distributed in the hope that it will be useful,
88 # but WITHOUT ANY WARRANTY; without even the implied warranty of
89 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90 # GNU General Public License for more details.
92 # You should have received a copy of the GNU General Public License
93 # along with this program; if not, write to the Free Software Foundation,
94 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
96 # The Original Code is Copyright (C) 2011, Blender Foundation
97 # All rights reserved.
99 # Contributor(s): Blender Foundation,
102 # ***** END GPL LICENSE BLOCK *****
104 # NOTE: This file is automatically generated by bundle.sh script
105 # If you're doing changes in this file, please update template
120 add_definitions(\${GFLAGS_DEFINES})
121 add_definitions(\${GLOG_DEFINES})
122 add_definitions(\${CERES_DEFINES})
123 add_definitions(-DLIBMV_GFLAGS_NAMESPACE=\${GFLAGS_NAMESPACE})
126 \${GFLAGS_INCLUDE_DIRS}
127 \${GLOG_INCLUDE_DIRS}
128 ../../extern/ceres/include
129 ../../extern/ceres/config
134 \${EIGEN3_INCLUDE_DIRS}
136 \${ZLIB_INCLUDE_DIRS}
140 -DWITH_LIBMV_GUARDED_ALLOC
141 -DLIBMV_NO_FAST_DETECTOR=
146 intern/camera_intrinsics.cc
148 intern/frame_accessor.cc
152 intern/reconstruction.cc
153 intern/track_region.cc
160 intern/camera_intrinsics.h
162 intern/frame_accessor.h
166 intern/reconstruction.h
167 intern/track_region.h
177 blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "${INC}" "${INC_SYS}")
187 blender_add_lib(bf_intern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}")