From 4cf9034f6d59840f8312094c184b9708a251fe0a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 22 Feb 2013 10:06:54 +0000 Subject: Remove extern_ssba workaround SSBA seemed to be working OK last time i've checked it with MSVC and optimization enabled. Also, we'll likely replace it with own BA soon, which works fine with MSVC anyway. --- extern/libmv/CMakeLists.txt | 12 ++++++ extern/libmv/SConscript | 5 ++- extern/libmv/bundle.sh | 33 +------------- extern/libmv/third_party/CMakeLists.txt | 1 - extern/libmv/third_party/SConscript | 1 - extern/libmv/third_party/ssba/CMakeLists.txt | 64 ---------------------------- extern/libmv/third_party/ssba/SConscript | 36 ---------------- 7 files changed, 17 insertions(+), 135 deletions(-) delete mode 100644 extern/libmv/third_party/ssba/CMakeLists.txt delete mode 100644 extern/libmv/third_party/ssba/SConscript (limited to 'extern') diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt index 0cf2211fe88..0fc90fdd9b9 100644 --- a/extern/libmv/CMakeLists.txt +++ b/extern/libmv/CMakeLists.txt @@ -35,6 +35,7 @@ set(INC set(INC_SYS ../Eigen3 third_party/ssba + third_party/ldl/Include ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} ) @@ -82,6 +83,9 @@ set(SRC third_party/gflags/gflags.cc third_party/gflags/gflags_completions.cc third_party/gflags/gflags_reporting.cc + third_party/ldl/Source/ldl.c + third_party/ssba/Geometry/v3d_metricbundle.cpp + third_party/ssba/Math/v3d_optimization.cpp libmv-capi.h libmv/base/id_generator.h @@ -139,8 +143,16 @@ set(SRC third_party/gflags/gflags/gflags.h third_party/gflags/mutex.h third_party/gflags/util.h + third_party/ldl/Include/ldl.h third_party/msinttypes/inttypes.h third_party/msinttypes/stdint.h + third_party/ssba/Geometry/v3d_cameramatrix.h + third_party/ssba/Geometry/v3d_distortion.h + third_party/ssba/Geometry/v3d_metricbundle.h + third_party/ssba/Math/v3d_linear.h + third_party/ssba/Math/v3d_linear_utils.h + third_party/ssba/Math/v3d_mathutilities.h + third_party/ssba/Math/v3d_optimization.h ) if(WIN32) diff --git a/extern/libmv/SConscript b/extern/libmv/SConscript index a0ab5bd61d7..8fd8c566e4d 100644 --- a/extern/libmv/SConscript +++ b/extern/libmv/SConscript @@ -22,6 +22,9 @@ src += env.Glob('libmv/simple_pipeline/*.cc') src += env.Glob('libmv/tracking/*.cc') src += env.Glob('third_party/fast/*.c') src += env.Glob('third_party/gflags/*.cc') +src += env.Glob('third_party/ldl/Source/*.c') +src += env.Glob('third_party/ssba/Geometry/*.cpp') +src += env.Glob('third_party/ssba/Math/*.cpp') incs = '. ../Eigen3 third_party/ceres/include' incs += ' ' + env['BF_PNG_INC'] @@ -38,7 +41,7 @@ else: src += env.Glob("third_party/glog/src/*.cc") incs += ' ./third_party/glog/src' -incs += ' ./third_party/ssba ../colamd/Include' +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] ) diff --git a/extern/libmv/bundle.sh b/extern/libmv/bundle.sh index 27f964ad5b3..53487cf020e 100755 --- a/extern/libmv/bundle.sh +++ b/extern/libmv/bundle.sh @@ -122,8 +122,6 @@ cat > CMakeLists.txt << EOF # If you're doing changes in this file, please update template # in that script too -add_subdirectory(third_party) - set(INC . ../colamd/Include @@ -186,14 +184,6 @@ if(WIN32) third_party/msinttypes ) endif() - - if(MSVC) - set(MSVC_OFLAGS O1 O2 Ox) - 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}") - endforeach() - endif() else() list(APPEND SRC ${third_glog_sources} @@ -230,10 +220,6 @@ 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=') @@ -251,30 +237,13 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', ' ${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']: - cflags_libmv += Split(env['REL_CFLAGS']) - ccflags_libmv += Split(env['REL_CCFLAGS']) - cxxflags_libmv += Split(env['REL_CXXFLAGS']) else: src += env.Glob("third_party/glog/src/*.cc") incs += ' ./third_party/glog/src' - if not env['BF_DEBUG']: - cflags_libmv += Split(env['REL_CFLAGS']) - ccflags_libmv += Split(env['REL_CCFLAGS']) - cxxflags_libmv += Split(env['REL_CXXFLAGS']) 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 ) +env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137] ) SConscript(['third_party/SConscript']) EOF diff --git a/extern/libmv/third_party/CMakeLists.txt b/extern/libmv/third_party/CMakeLists.txt index 7989d97345c..6212fe480b1 100644 --- a/extern/libmv/third_party/CMakeLists.txt +++ b/extern/libmv/third_party/CMakeLists.txt @@ -1,3 +1,2 @@ -add_subdirectory(ssba) add_subdirectory(ceres) diff --git a/extern/libmv/third_party/SConscript b/extern/libmv/third_party/SConscript index 2e30650f656..b05692e385f 100644 --- a/extern/libmv/third_party/SConscript +++ b/extern/libmv/third_party/SConscript @@ -1,4 +1,3 @@ #!/usr/bin/python -SConscript(['ssba/SConscript']) SConscript(['ceres/SConscript']) diff --git a/extern/libmv/third_party/ssba/CMakeLists.txt b/extern/libmv/third_party/ssba/CMakeLists.txt deleted file mode 100644 index 72379625396..00000000000 --- a/extern/libmv/third_party/ssba/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -# ***** 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, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# The Original Code is Copyright (C) 2013, Blender Foundation -# All rights reserved. -# -# Contributor(s): Blender Foundation, -# Sergey Sharybin -# -# ***** END GPL LICENSE BLOCK ***** - -set(INC - . - ../ldl/Include - ../../../colamd/Include -) - -set(INC_SYS -) - -set(SRC - Geometry/v3d_metricbundle.cpp - Math/v3d_optimization.cpp - - Geometry/v3d_cameramatrix.h - Geometry/v3d_distortion.h - Geometry/v3d_metricbundle.h - Math/v3d_linear.h - Math/v3d_linear_utils.h - Math/v3d_mathutilities.h - Math/v3d_optimization.h - - ../ldl/Source/ldl.c - ../ldl/Include/ldl.h -) - -if(WIN32) - if(MSVC) - set(MSVC_OFLAGS O1 O2 Ox) - 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}") - endforeach() - endif() -endif() - -add_definitions( - -DV3DLIB_ENABLE_SUITESPARSE -) - -blender_add_lib(extern_ssba "${SRC}" "${INC}" "${INC_SYS}") diff --git a/extern/libmv/third_party/ssba/SConscript b/extern/libmv/third_party/ssba/SConscript deleted file mode 100644 index 667b40f929b..00000000000 --- a/extern/libmv/third_party/ssba/SConscript +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python - -import sys -import os - -Import('env') - -defs = [] - -cflags_ssba = Split(env['CFLAGS']) -ccflags_ssba = Split(env['CCFLAGS']) -cxxflags_ssba = Split(env['CXXFLAGS']) - -defs.append('V3DLIB_ENABLE_SUITESPARSE') - -src = env.Glob('Geometry/*.cpp') -src += env.Glob('Math/*.cpp') -src += env.Glob('../ldl/Source/*.c') - -incs = '. ../ldl/Include ../../../colamd/Include' - -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): - if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - cflags_ssba.append('/Od') - ccflags_ssba.append('/Od') - cxxflags_ssba.append('/Od') - - if not env['BF_DEBUG']: - defs.append('NDEBUG') - else: - if not env['BF_DEBUG']: - cflags_ssba += Split(env['REL_CFLAGS']) - ccflags_ssba += Split(env['REL_CCFLAGS']) - cxxflags_ssba += Split(env['REL_CXXFLAGS']) - -env.BlenderLib ( libname = 'extern_ssba', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_ssba, cc_compileflags=ccflags_ssba, cxx_compileflags=cxxflags_ssba ) -- cgit v1.2.3