2011-11-07 12:55:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#BRANCH="keir"
|
2012-02-17 15:39:32 +00:00
|
|
|
#BRANCH="Matthias-Fauconneau"
|
|
|
|
BRANCH="Nazg-Gul"
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
if [ -d ./.svn ]; then
|
|
|
|
echo "This script is supposed to work only when using git-svn"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
repo="git://github.com/${BRANCH}/libmv.git"
|
|
|
|
tmp=`mktemp -d`
|
|
|
|
|
|
|
|
git clone $repo $tmp/libmv
|
|
|
|
|
|
|
|
#git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log --since="1 month ago" > ChangeLog
|
|
|
|
git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log -n 50 > ChangeLog
|
|
|
|
|
|
|
|
for p in `cat ./patches/series`; do
|
|
|
|
echo "Applying patch $p..."
|
|
|
|
cat ./patches/$p | patch -d $tmp/libmv -p1
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -rf libmv
|
Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.
Integration details:
- Even CMake build files are not re-used from Ceres's trunk: they're using some
automatic stuff detection like glog, pthreads, protobuf and so and it's not
so clear how to re-use that files without modifications.
And IMO it's easier if build files are getting re-generated automatically to
match Blender-specific setup rather than keeping changes made locally in
Blender in sync when re-bundling Ceres library. Especially in case when it's
alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
to have them, but they'll need clear integration with current module test stuff
in Blender.
Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
also not sure if it makes sense having them switchable on and off -- IMO better
to have single configuration which works and does not require special tweaks
after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
away -- all symbols would be stripped anyway, but it'll be waste of compilation
time which is annoying in cases when one doing, say, binary search of revision
at which some regression was introduced. Especially when it's easy to add modules
which should be used by Blender.
But as long as it stays in Tomato i'm not worrying much about this.
To bundle updated version of Ceres:
- You'll need to use GIT-SVN checkout,
Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh
This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.
If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.
Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!
2012-05-09 15:39:54 +00:00
|
|
|
rm -rf `find third_party/ -mindepth 1 -maxdepth 1 | grep -v ceres | grep -v CMake | grep -c SCons`
|
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
|
|
|
|
|
2011-12-15 12:44:05 +00:00
|
|
|
sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/' | sort -d`
|
|
|
|
headers=`find ./libmv -type f -iname '*.h' | sed -r 's/^\.\//\t/' | sort -d`
|
2011-11-07 12:55:18 +00:00
|
|
|
|
Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.
Integration details:
- Even CMake build files are not re-used from Ceres's trunk: they're using some
automatic stuff detection like glog, pthreads, protobuf and so and it's not
so clear how to re-use that files without modifications.
And IMO it's easier if build files are getting re-generated automatically to
match Blender-specific setup rather than keeping changes made locally in
Blender in sync when re-bundling Ceres library. Especially in case when it's
alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
to have them, but they'll need clear integration with current module test stuff
in Blender.
Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
also not sure if it makes sense having them switchable on and off -- IMO better
to have single configuration which works and does not require special tweaks
after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
away -- all symbols would be stripped anyway, but it'll be waste of compilation
time which is annoying in cases when one doing, say, binary search of revision
at which some regression was introduced. Especially when it's easy to add modules
which should be used by Blender.
But as long as it stays in Tomato i'm not worrying much about this.
To bundle updated version of Ceres:
- You'll need to use GIT-SVN checkout,
Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh
This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.
If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.
Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!
2012-05-09 15:39:54 +00:00
|
|
|
third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | grep -v ceres | sed -r 's/^\.\//\t/' | sort -d`
|
|
|
|
third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | grep -v ceres | sed -r 's/^\.\//\t/' | sort -d`
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-17 15:39:32 +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/' | sort -d`
|
|
|
|
third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d`
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-02-17 15:39:32 +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/' | sort -d | uniq`
|
Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.
Integration details:
- Even CMake build files are not re-used from Ceres's trunk: they're using some
automatic stuff detection like glog, pthreads, protobuf and so and it's not
so clear how to re-use that files without modifications.
And IMO it's easier if build files are getting re-generated automatically to
match Blender-specific setup rather than keeping changes made locally in
Blender in sync when re-bundling Ceres library. Especially in case when it's
alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
to have them, but they'll need clear integration with current module test stuff
in Blender.
Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
also not sure if it makes sense having them switchable on and off -- IMO better
to have single configuration which works and does not require special tweaks
after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
away -- all symbols would be stripped anyway, but it'll be waste of compilation
time which is annoying in cases when one doing, say, binary search of revision
at which some regression was introduced. Especially when it's easy to add modules
which should be used by Blender.
But as long as it stays in Tomato i'm not worrying much about this.
To bundle updated version of Ceres:
- You'll need to use GIT-SVN checkout,
Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh
This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.
If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.
Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!
2012-05-09 15:39:54 +00:00
|
|
|
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/' | 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
|
|
|
|
t="src += env.Glob('`echo $x'/*.cpp'`')"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if stat $x/*.c > /dev/null 2>&1; then
|
|
|
|
if [ -z "$t" ]; then
|
|
|
|
t="src += env.Glob('`echo $x'/*.c'`')"
|
|
|
|
else
|
|
|
|
t="$t + env.Glob('`echo $x'/*.c'`')"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if stat $x/*.cc > /dev/null 2>&1; then
|
|
|
|
if [ -z "$t" ]; then
|
|
|
|
t="src += env.Glob('`echo $x'/*.cc'`')"
|
|
|
|
else
|
|
|
|
t="$t + env.Glob('`echo $x'/*.cc'`')"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test `echo $x | grep -c windows ` -eq 0; then
|
|
|
|
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
|
|
|
|
.
|
|
|
|
../Eigen3
|
2011-12-15 12:44:05 +00:00
|
|
|
third_party/ssba
|
|
|
|
third_party/ldl/Include
|
2011-11-07 12:55:18 +00:00
|
|
|
../colamd/Include
|
Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.
Integration details:
- Even CMake build files are not re-used from Ceres's trunk: they're using some
automatic stuff detection like glog, pthreads, protobuf and so and it's not
so clear how to re-use that files without modifications.
And IMO it's easier if build files are getting re-generated automatically to
match Blender-specific setup rather than keeping changes made locally in
Blender in sync when re-bundling Ceres library. Especially in case when it's
alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
to have them, but they'll need clear integration with current module test stuff
in Blender.
Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
also not sure if it makes sense having them switchable on and off -- IMO better
to have single configuration which works and does not require special tweaks
after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
away -- all symbols would be stripped anyway, but it'll be waste of compilation
time which is annoying in cases when one doing, say, binary search of revision
at which some regression was introduced. Especially when it's easy to add modules
which should be used by Blender.
But as long as it stays in Tomato i'm not worrying much about this.
To bundle updated version of Ceres:
- You'll need to use GIT-SVN checkout,
Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh
This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.
If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.
Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!
2012-05-09 15:39:54 +00:00
|
|
|
third_party/ceres/include
|
2011-11-07 12:55:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(INC_SYS
|
2011-12-15 12:44:05 +00:00
|
|
|
\${PNG_INCLUDE_DIR}
|
|
|
|
\${ZLIB_INCLUDE_DIRS}
|
2011-11-07 12:55:18 +00:00
|
|
|
)
|
|
|
|
|
2012-03-21 12:15:02 +00:00
|
|
|
|
|
|
|
# XXX - FIXME
|
|
|
|
# this is a momentary hack to find unwind.h in 10.6.sdk
|
2012-03-23 10:39:59 +00:00
|
|
|
if(APPLE)
|
|
|
|
if(\${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.6")
|
|
|
|
list(APPEND INC_SYS
|
|
|
|
\${CMAKE_OSX_SYSROOT}/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/include
|
|
|
|
)
|
|
|
|
endif()
|
2012-03-21 12:15:02 +00:00
|
|
|
endif()
|
|
|
|
# XXX - END
|
|
|
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
set(SRC
|
|
|
|
libmv-capi.cpp
|
|
|
|
${sources}
|
|
|
|
|
|
|
|
${third_sources}
|
|
|
|
|
|
|
|
libmv-capi.h
|
|
|
|
${headers}
|
|
|
|
|
|
|
|
${third_headers}
|
|
|
|
)
|
|
|
|
|
2011-12-15 12:44:05 +00:00
|
|
|
if(WIN32)
|
2011-11-07 12:55:18 +00:00
|
|
|
list(APPEND SRC
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2011-11-07 18:14:50 +00:00
|
|
|
list(APPEND INC
|
2011-12-15 12:44:05 +00:00
|
|
|
third_party/glog/src/windows
|
2011-11-07 18:14:50 +00:00
|
|
|
)
|
|
|
|
|
2011-12-15 12:44:05 +00:00
|
|
|
if(NOT MINGW)
|
2011-11-07 18:14:50 +00:00
|
|
|
list(APPEND INC
|
2011-12-15 12:44:05 +00:00
|
|
|
third_party/msinttypes
|
2011-11-07 18:14:50 +00:00
|
|
|
)
|
2011-12-15 12:44:05 +00:00
|
|
|
endif()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2011-12-15 12:44:05 +00:00
|
|
|
if(MSVC)
|
2011-11-07 12:55:18 +00:00
|
|
|
set(MSVC_OFLAGS O1 O2 Ox)
|
2011-12-01 10:25:16 +00:00
|
|
|
foreach(FLAG \${MSVC_OFLAGS})
|
|
|
|
string(REPLACE "\${FLAG}" "Od" CMAKE_CXX_FLAGS_RELEASE "\${CMAKE_CXX_FLAGS_RELEASE}")
|
|
|
|
string(REPLACE "\${FLAG}" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "\${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
2011-11-07 12:55:18 +00:00
|
|
|
endforeach()
|
2011-12-15 12:44:05 +00:00
|
|
|
endif()
|
|
|
|
else()
|
2011-11-07 12:55:18 +00:00
|
|
|
list(APPEND SRC
|
|
|
|
${third_glog_sources}
|
|
|
|
|
|
|
|
${third_glog_headers}
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND INC
|
2011-12-15 12:44:05 +00:00
|
|
|
third_party/glog/src
|
2011-11-07 12:55:18 +00:00
|
|
|
)
|
2011-12-15 12:44:05 +00:00
|
|
|
endif()
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2011-12-15 12:44:05 +00:00
|
|
|
add_definitions(
|
|
|
|
-DV3DLIB_ENABLE_SUITESPARSE
|
|
|
|
-DGOOGLE_GLOG_DLL_DECL=
|
|
|
|
)
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
blender_add_lib(extern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}")
|
Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.
Integration details:
- Even CMake build files are not re-used from Ceres's trunk: they're using some
automatic stuff detection like glog, pthreads, protobuf and so and it's not
so clear how to re-use that files without modifications.
And IMO it's easier if build files are getting re-generated automatically to
match Blender-specific setup rather than keeping changes made locally in
Blender in sync when re-bundling Ceres library. Especially in case when it's
alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
to have them, but they'll need clear integration with current module test stuff
in Blender.
Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
also not sure if it makes sense having them switchable on and off -- IMO better
to have single configuration which works and does not require special tweaks
after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
away -- all symbols would be stripped anyway, but it'll be waste of compilation
time which is annoying in cases when one doing, say, binary search of revision
at which some regression was introduced. Especially when it's easy to add modules
which should be used by Blender.
But as long as it stays in Tomato i'm not worrying much about this.
To bundle updated version of Ceres:
- You'll need to use GIT-SVN checkout,
Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh
This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.
If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.
Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!
2012-05-09 15:39:54 +00:00
|
|
|
|
|
|
|
add_subdirectory(third_party)
|
2011-11-07 12:55:18 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > SConscript << EOF
|
|
|
|
#!/usr/bin/python
|
2011-12-15 12:44:05 +00:00
|
|
|
|
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
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
defs = []
|
|
|
|
|
|
|
|
cflags_libmv = Split(env['CFLAGS'])
|
|
|
|
ccflags_libmv = Split(env['CCFLAGS'])
|
|
|
|
cxxflags_libmv = Split(env['CXXFLAGS'])
|
|
|
|
|
|
|
|
defs.append('V3DLIB_ENABLE_SUITESPARSE')
|
|
|
|
defs.append('GOOGLE_GLOG_DLL_DECL=')
|
|
|
|
|
|
|
|
src = env.Glob("*.cpp")
|
|
|
|
$src
|
|
|
|
|
Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.
Integration details:
- Even CMake build files are not re-used from Ceres's trunk: they're using some
automatic stuff detection like glog, pthreads, protobuf and so and it's not
so clear how to re-use that files without modifications.
And IMO it's easier if build files are getting re-generated automatically to
match Blender-specific setup rather than keeping changes made locally in
Blender in sync when re-bundling Ceres library. Especially in case when it's
alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
to have them, but they'll need clear integration with current module test stuff
in Blender.
Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
also not sure if it makes sense having them switchable on and off -- IMO better
to have single configuration which works and does not require special tweaks
after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
away -- all symbols would be stripped anyway, but it'll be waste of compilation
time which is annoying in cases when one doing, say, binary search of revision
at which some regression was introduced. Especially when it's easy to add modules
which should be used by Blender.
But as long as it stays in Tomato i'm not worrying much about this.
To bundle updated version of Ceres:
- You'll need to use GIT-SVN checkout,
Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh
This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.
If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.
Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!
2012-05-09 15:39:54 +00:00
|
|
|
incs = '. ../Eigen3 third_party/ceres/include'
|
2011-11-07 12:55:18 +00:00
|
|
|
incs += ' ' + env['BF_PNG_INC']
|
|
|
|
incs += ' ' + env['BF_ZLIB_INC']
|
|
|
|
|
2012-04-24 12:57:58 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
|
2011-11-07 18:14:50 +00:00
|
|
|
incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
|
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
|
|
|
incs += ' ./third_party/msinttypes'
|
2011-11-07 12:55:18 +00:00
|
|
|
${win_src}
|
|
|
|
src += ['./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']
|
|
|
|
src += ['./third_party/glog/src/windows/port.cc']
|
|
|
|
|
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
|
|
|
cflags_libmv.append('/Od')
|
|
|
|
ccflags_libmv.append('/Od')
|
|
|
|
cxxflags_libmv.append('/Od')
|
|
|
|
|
|
|
|
if not env['BF_DEBUG']:
|
|
|
|
defs.append('NDEBUG')
|
|
|
|
else:
|
|
|
|
if not env['BF_DEBUG']:
|
2011-12-15 12:44:05 +00:00
|
|
|
cflags_libmv += Split(env['REL_CFLAGS'])
|
|
|
|
ccflags_libmv += Split(env['REL_CCFLAGS'])
|
|
|
|
cxxflags_libmv += Split(env['REL_CXXFLAGS'])
|
2011-11-07 12:55:18 +00:00
|
|
|
else:
|
|
|
|
src += env.Glob("third_party/glog/src/*.cc")
|
|
|
|
incs += ' ./third_party/glog/src'
|
|
|
|
if not env['BF_DEBUG']:
|
2011-12-15 12:44:05 +00:00
|
|
|
cflags_libmv += Split(env['REL_CFLAGS'])
|
|
|
|
ccflags_libmv += Split(env['REL_CCFLAGS'])
|
|
|
|
cxxflags_libmv += Split(env['REL_CXXFLAGS'])
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include'
|
|
|
|
|
|
|
|
env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv )
|
Initial Ceres integration into Blender
Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.
Integration details:
- Even CMake build files are not re-used from Ceres's trunk: they're using some
automatic stuff detection like glog, pthreads, protobuf and so and it's not
so clear how to re-use that files without modifications.
And IMO it's easier if build files are getting re-generated automatically to
match Blender-specific setup rather than keeping changes made locally in
Blender in sync when re-bundling Ceres library. Especially in case when it's
alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
to have them, but they'll need clear integration with current module test stuff
in Blender.
Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
also not sure if it makes sense having them switchable on and off -- IMO better
to have single configuration which works and does not require special tweaks
after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
away -- all symbols would be stripped anyway, but it'll be waste of compilation
time which is annoying in cases when one doing, say, binary search of revision
at which some regression was introduced. Especially when it's easy to add modules
which should be used by Blender.
But as long as it stays in Tomato i'm not worrying much about this.
To bundle updated version of Ceres:
- You'll need to use GIT-SVN checkout,
Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh
This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.
If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.
Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!
2012-05-09 15:39:54 +00:00
|
|
|
|
|
|
|
SConscript(['third_party/SConscript'])
|
2011-11-07 12:55:18 +00:00
|
|
|
EOF
|