Remove extern_ssba workaround
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 22 Feb 2013 10:06:54 +0000 (10:06 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 22 Feb 2013 10:06:54 +0000 (10:06 +0000)
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
extern/libmv/SConscript
extern/libmv/bundle.sh
extern/libmv/third_party/CMakeLists.txt
extern/libmv/third_party/SConscript
extern/libmv/third_party/ssba/CMakeLists.txt [deleted file]
extern/libmv/third_party/ssba/SConscript [deleted file]
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt

index 0cf2211fe888dd367c322fce2e785d4742930b28..0fc90fdd9b91b8649c24e63ebe8ba1ccf107ac91 100644 (file)
@@ -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)
index a0ab5bd61d789a47dc75c8e3f80db11d50689cdd..8fd8c566e4d063068f958505603c014545c953a8 100644 (file)
@@ -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] )
 
index 27f964ad5b3bb58bb35cd5b75c8acbf3ad24d7f8..53487cf020eed9104522f1b69bac9472a70bec60 100755 (executable)
@@ -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
index 7989d97345ce64ea062fa9d4b3bed579de4c184b..6212fe480b122cd5c803eba9efb0d2b527a93ff0 100644 (file)
@@ -1,3 +1,2 @@
 
-add_subdirectory(ssba)
 add_subdirectory(ceres)
index 2e30650f656d464fad801f675462e69b4626cd4d..b05692e385fcac37989076a2e7090eaf390c2b2c 100644 (file)
@@ -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 (file)
index 7237962..0000000
+++ /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 (file)
index 667b40f..0000000
+++ /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 )
index cd3edc11c4691ddd1ef399adcc509823e509832e..fb06c5e44775b01ea4bdf1dedb0f1ced1ffac7e7 100644 (file)
@@ -167,7 +167,6 @@ endif()
 
        if(WITH_LIBMV)
                list(APPEND BLENDER_SORTED_LIBS extern_libmv)
-               list(APPEND BLENDER_SORTED_LIBS extern_ssba)
                list(APPEND BLENDER_SORTED_LIBS extern_ceres)
        endif()
 
index bb10bdd0bae9ed204b0fbff23437c04323c231df..bb5f34167bc7dfcceb666f5a779ff5f81e8262f1 100644 (file)
@@ -923,7 +923,6 @@ endif()
 
        if(WITH_LIBMV)
                list(APPEND BLENDER_SORTED_LIBS extern_libmv)
-               list(APPEND BLENDER_SORTED_LIBS extern_ssba)
                list(APPEND BLENDER_SORTED_LIBS extern_ceres)
        endif()