2011-11-07 12:55:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-05-10 11:08:25 +00:00
|
|
|
if [ "x$1" = "x--i-really-know-what-im-doing" ] ; then
|
2012-05-10 11:17:15 +00:00
|
|
|
echo Proceeding as requested by command line ...
|
2012-05-10 11:08:25 +00:00
|
|
|
else
|
2012-05-10 11:17:15 +00:00
|
|
|
echo "*** Please run again with --i-really-know-what-im-doing ..."
|
|
|
|
exit 1
|
2012-05-10 11:08:25 +00:00
|
|
|
fi
|
|
|
|
|
2014-09-25 11:01:06 +00:00
|
|
|
BRANCH="master"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2013-12-30 13:03:13 +00:00
|
|
|
repo="git://git.blender.org/libmv.git"
|
2011-11-07 12:55:18 +00:00
|
|
|
tmp=`mktemp -d`
|
|
|
|
|
2013-12-30 13:03:13 +00:00
|
|
|
git clone -b $BRANCH $repo $tmp/libmv
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log -n 50 > ChangeLog
|
|
|
|
|
2012-05-10 11:08:25 +00:00
|
|
|
find libmv -type f -not -iwholename '*.svn*' -exec rm -rf {} \;
|
2012-06-10 15:27:41 +00:00
|
|
|
find third_party -type f -not -iwholename '*.svn*' -not -iwholename '*third_party/ceres*' \
|
Remove SCons building system
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.
What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.
Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.
This commit includes:
- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
(this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
as well
Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit
Reviewed By: campbellbarton, juicyfruit
Differential Revision: https://developer.blender.org/D1680
2016-01-04 09:20:48 +00:00
|
|
|
-not -iwholename '*third_party/CMakeLists.txt*' \
|
2012-06-10 15:27:41 +00:00
|
|
|
-exec rm -rf {} \;
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-17 15:39:32 +00:00
|
|
|
cat "files.txt" | while read f; do
|
2011-11-07 12:55:18 +00:00
|
|
|
mkdir -p `dirname $f`
|
|
|
|
cp $tmp/libmv/src/$f $f
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -rf $tmp
|
|
|
|
|
|
|
|
chmod 664 ./third_party/glog/src/windows/*.cc ./third_party/glog/src/windows/*.h ./third_party/glog/src/windows/glog/*.h
|
|
|
|
|
2014-06-18 12:49:17 +00:00
|
|
|
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`
|
|
|
|
headers=`find ./libmv -type f -iname '*.h' | grep -v test_data_sets | sed -r 's/^\.\//\t\t/' | sort -d`
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-06-18 12:49:17 +00:00
|
|
|
third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | grep -v gflags | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d`
|
|
|
|
third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | grep -v gflags | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d`
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2013-05-12 22:17:37 +00:00
|
|
|
third_glog_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t\t/' | sort -d`
|
|
|
|
third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t\t/' | sort -d`
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2014-06-18 12:49:17 +00:00
|
|
|
third_gflags_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep gflags | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d`
|
|
|
|
third_gflags_headers=`find ./third_party -type f -iname '*.h' | grep gflags | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d`
|
|
|
|
|
2014-06-18 18:35:15 +00:00
|
|
|
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;extern_libmv;extern_ceres\")\n", name, $1) } '`
|
2014-06-18 12:49:17 +00:00
|
|
|
|
2013-05-12 22:17:37 +00:00
|
|
|
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`
|
|
|
|
src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d | uniq`
|
2011-11-07 12:55:18 +00:00
|
|
|
src=""
|
|
|
|
win_src=""
|
|
|
|
for x in $src_dir $src_third_dir; do
|
|
|
|
t=""
|
|
|
|
|
|
|
|
if test `echo "$x" | grep -c glog ` -eq 1; then
|
|
|
|
continue;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if stat $x/*.cpp > /dev/null 2>&1; then
|
2013-05-12 22:17:37 +00:00
|
|
|
t=" src += env.Glob('`echo $x'/*.cpp'`')"
|
2011-11-07 12:55:18 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if stat $x/*.c > /dev/null 2>&1; then
|
|
|
|
if [ -z "$t" ]; then
|
2013-05-12 22:17:37 +00:00
|
|
|
t=" src += env.Glob('`echo $x'/*.c'`')"
|
2011-11-07 12:55:18 +00:00
|
|
|
else
|
|
|
|
t="$t + env.Glob('`echo $x'/*.c'`')"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if stat $x/*.cc > /dev/null 2>&1; then
|
|
|
|
if [ -z "$t" ]; then
|
2013-05-12 22:17:37 +00:00
|
|
|
t=" src += env.Glob('`echo $x'/*.cc'`')"
|
2011-11-07 12:55:18 +00:00
|
|
|
else
|
|
|
|
t="$t + env.Glob('`echo $x'/*.cc'`')"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-12-31 11:34:22 +00:00
|
|
|
if test `echo $x | grep -c "windows\|gflags" ` -eq 0; then
|
2011-11-07 12:55:18 +00:00
|
|
|
if [ -z "$src" ]; then
|
|
|
|
src=$t
|
|
|
|
else
|
|
|
|
src=`echo "$src\n$t"`
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -z "$win_src" ]; then
|
|
|
|
win_src=`echo " $t"`
|
|
|
|
else
|
|
|
|
win_src=`echo "$win_src\n $t"`
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cat > CMakeLists.txt << EOF
|
|
|
|
# ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2012-02-17 15:39:32 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2011-11-07 12:55:18 +00:00
|
|
|
#
|
|
|
|
# The Original Code is Copyright (C) 2011, Blender Foundation
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s): Blender Foundation,
|
|
|
|
# Sergey Sharybin
|
|
|
|
#
|
|
|
|
# ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
2012-01-11 07:19:44 +00:00
|
|
|
# NOTE: This file is automatically generated by bundle.sh script
|
2011-12-15 12:44:05 +00:00
|
|
|
# If you're doing changes in this file, please update template
|
|
|
|
# in that script too
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
set(INC
|
|
|
|
.
|
|
|
|
)
|
|
|
|
|
2014-06-18 12:49:17 +00:00
|
|
|
set(INC_SYS
|
|
|
|
)
|
|
|
|
|
2013-05-12 22:17:37 +00:00
|
|
|
set(SRC
|
|
|
|
libmv-capi.h
|
2011-11-07 12:55:18 +00:00
|
|
|
)
|
|
|
|
|
2014-12-11 06:50:04 +00:00
|
|
|
if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
|
|
|
|
list(APPEND INC
|
|
|
|
third_party/gflags
|
2014-12-31 10:55:00 +00:00
|
|
|
third_party/gflags/gflags
|
2014-12-11 06:50:04 +00:00
|
|
|
third_party/glog/src
|
|
|
|
third_party/ceres/include
|
|
|
|
third_party/ceres/config
|
|
|
|
../../intern/guardedalloc
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND INC_SYS
|
2015-03-19 04:41:41 +00:00
|
|
|
\${EIGEN3_INCLUDE_DIRS}
|
2014-12-11 06:50:04 +00:00
|
|
|
\${PNG_INCLUDE_DIRS}
|
|
|
|
\${ZLIB_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
list(APPEND INC
|
|
|
|
third_party/glog/src/windows
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT MINGW)
|
|
|
|
list(APPEND INC
|
|
|
|
third_party/msinttypes
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2013-05-12 22:17:37 +00:00
|
|
|
add_definitions(
|
2013-10-09 08:46:02 +00:00
|
|
|
-DWITH_LIBMV_GUARDED_ALLOC
|
|
|
|
-DGOOGLE_GLOG_DLL_DECL=
|
2014-02-06 12:13:12 +00:00
|
|
|
-DLIBMV_NO_FAST_DETECTOR=
|
2013-05-12 22:17:37 +00:00
|
|
|
)
|
2014-12-11 06:50:04 +00:00
|
|
|
endif()
|
2013-05-12 22:17:37 +00:00
|
|
|
|
2014-12-11 06:50:04 +00:00
|
|
|
if(WITH_LIBMV)
|
2014-05-01 23:52:56 +00:00
|
|
|
TEST_SHARED_PTR_SUPPORT()
|
|
|
|
if(SHARED_PTR_FOUND)
|
|
|
|
if(SHARED_PTR_TR1_MEMORY_HEADER)
|
|
|
|
add_definitions(-DCERES_TR1_MEMORY_HEADER)
|
|
|
|
endif()
|
|
|
|
if(SHARED_PTR_TR1_NAMESPACE)
|
|
|
|
add_definitions(-DCERES_TR1_SHARED_PTR)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unable to find shared_ptr.")
|
|
|
|
endif()
|
|
|
|
|
2013-05-12 22:17:37 +00:00
|
|
|
list(APPEND SRC
|
2014-06-22 08:53:21 +00:00
|
|
|
intern/autotrack.cc
|
2014-09-25 11:01:06 +00:00
|
|
|
intern/camera_intrinsics.cc
|
|
|
|
intern/detector.cc
|
2014-06-22 08:53:21 +00:00
|
|
|
intern/frame_accessor.cc
|
2014-09-25 11:01:06 +00:00
|
|
|
intern/homography.cc
|
|
|
|
intern/image.cc
|
|
|
|
intern/logging.cc
|
|
|
|
intern/reconstruction.cc
|
|
|
|
intern/track_region.cc
|
|
|
|
intern/tracks.cc
|
2014-06-22 08:53:21 +00:00
|
|
|
intern/tracksN.cc
|
2011-11-07 12:55:18 +00:00
|
|
|
${sources}
|
|
|
|
${third_sources}
|
2014-09-25 11:01:06 +00:00
|
|
|
|
2014-06-22 08:53:21 +00:00
|
|
|
intern/autotrack.h
|
2014-09-25 11:01:06 +00:00
|
|
|
intern/camera_intrinsics.h
|
|
|
|
intern/detector.h
|
2014-06-22 08:53:21 +00:00
|
|
|
intern/frame_accessor.h
|
2014-09-25 11:01:06 +00:00
|
|
|
intern/homography.h
|
|
|
|
intern/image.h
|
|
|
|
intern/logging.h
|
|
|
|
intern/reconstruction.h
|
|
|
|
intern/track_region.h
|
|
|
|
intern/tracks.h
|
2014-06-22 08:53:21 +00:00
|
|
|
intern/tracksN.h
|
2011-11-07 12:55:18 +00:00
|
|
|
${headers}
|
|
|
|
|
|
|
|
${third_headers}
|
|
|
|
)
|
|
|
|
|
2014-06-18 12:49:17 +00:00
|
|
|
|
2014-06-18 16:28:27 +00:00
|
|
|
if(WITH_GTESTS)
|
2014-06-18 12:49:17 +00:00
|
|
|
blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "${INC}" "${INC_SYS}")
|
|
|
|
|
|
|
|
${tests}
|
2014-06-18 18:35:15 +00:00
|
|
|
endif()
|
2014-06-18 12:49:17 +00:00
|
|
|
else()
|
|
|
|
list(APPEND SRC
|
2014-12-03 16:51:55 +00:00
|
|
|
intern/stub.cc
|
2014-06-18 12:49:17 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
blender_add_lib(extern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}")
|
|
|
|
|
|
|
|
if(WITH_LIBMV)
|
|
|
|
add_subdirectory(third_party)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# make GLog a separate target, so it can be used for gtest as well.
|
2014-12-11 06:50:04 +00:00
|
|
|
if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
|
2014-06-18 12:49:17 +00:00
|
|
|
# We compile GLog together with GFlag so we don't worry about
|
|
|
|
# adding extra lib to linker.
|
|
|
|
set(GLOG_SRC
|
|
|
|
${third_gflags_sources}
|
|
|
|
|
|
|
|
${third_gflags_headers}
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
list(APPEND GLOG_SRC
|
2013-05-12 22:17:37 +00:00
|
|
|
third_party/glog/src/logging.cc
|
|
|
|
third_party/glog/src/raw_logging.cc
|
|
|
|
third_party/glog/src/utilities.cc
|
|
|
|
third_party/glog/src/vlog_is_on.cc
|
|
|
|
third_party/glog/src/windows/port.cc
|
|
|
|
|
|
|
|
third_party/glog/src/utilities.h
|
|
|
|
third_party/glog/src/stacktrace_generic-inl.h
|
|
|
|
third_party/glog/src/stacktrace.h
|
|
|
|
third_party/glog/src/stacktrace_x86_64-inl.h
|
|
|
|
third_party/glog/src/base/googleinit.h
|
|
|
|
third_party/glog/src/base/mutex.h
|
|
|
|
third_party/glog/src/base/commandlineflags.h
|
|
|
|
third_party/glog/src/stacktrace_powerpc-inl.h
|
|
|
|
third_party/glog/src/stacktrace_x86-inl.h
|
|
|
|
third_party/glog/src/config.h
|
|
|
|
third_party/glog/src/stacktrace_libunwind-inl.h
|
|
|
|
third_party/glog/src/windows/glog/raw_logging.h
|
|
|
|
third_party/glog/src/windows/glog/vlog_is_on.h
|
|
|
|
third_party/glog/src/windows/glog/logging.h
|
|
|
|
third_party/glog/src/windows/glog/log_severity.h
|
|
|
|
third_party/glog/src/windows/port.h
|
|
|
|
third_party/glog/src/windows/config.h
|
2014-12-31 11:34:22 +00:00
|
|
|
|
|
|
|
third_party/gflags/windows_port.cc
|
|
|
|
third_party/gflags/windows_port.h
|
2013-05-12 22:17:37 +00:00
|
|
|
)
|
|
|
|
else()
|
2014-06-18 12:49:17 +00:00
|
|
|
list(APPEND GLOG_SRC
|
2011-11-07 12:55:18 +00:00
|
|
|
${third_glog_sources}
|
|
|
|
|
|
|
|
${third_glog_headers}
|
2013-05-12 22:17:37 +00:00
|
|
|
)
|
|
|
|
endif()
|
2014-06-18 12:49:17 +00:00
|
|
|
|
2014-12-11 06:50:04 +00:00
|
|
|
blender_add_lib(extern_glog "\${GLOG_SRC}" "\${INC}" "\${INC_SYS}")
|
2013-05-12 22:17:37 +00:00
|
|
|
endif()
|
2011-11-07 12:55:18 +00:00
|
|
|
EOF
|