Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extern/libmv/third_party/ceres/CMakeLists.txt14
-rwxr-xr-xextern/libmv/third_party/ceres/bundle.sh14
-rw-r--r--extern/libmv/third_party/ceres/patches/msvc_glog_fix.patch50
-rw-r--r--extern/libmv/third_party/ceres/patches/series1
4 files changed, 75 insertions, 4 deletions
diff --git a/extern/libmv/third_party/ceres/CMakeLists.txt b/extern/libmv/third_party/ceres/CMakeLists.txt
index 6f893090a74..16b7f12fb33 100644
--- a/extern/libmv/third_party/ceres/CMakeLists.txt
+++ b/extern/libmv/third_party/ceres/CMakeLists.txt
@@ -231,14 +231,24 @@ endif()
add_definitions(
-DCERES_HAVE_PTHREAD
- -D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
- -D"CERES_HASH_NAMESPACE_END=}}"
-DCERES_NO_SUITESPARSE
-DCERES_NO_CXSPARSE
-DCERES_NO_PROTOCOL_BUFFERS
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
)
+if(MSVC10)
+ add_definitions(
+ -D"CERES_HASH_NAMESPACE_START=namespace std {"
+ -D"CERES_HASH_NAMESPACE_END=}"
+ )
+else()
+ add_definitions(
+ -D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
+ -D"CERES_HASH_NAMESPACE_END=}}"
+ )
+endif()
+
if(APPLE)
if( STREQUAL "10.5")
add_definitions(
diff --git a/extern/libmv/third_party/ceres/bundle.sh b/extern/libmv/third_party/ceres/bundle.sh
index 8689f58ae4c..94ab8f87df6 100755
--- a/extern/libmv/third_party/ceres/bundle.sh
+++ b/extern/libmv/third_party/ceres/bundle.sh
@@ -156,14 +156,24 @@ endif()
add_definitions(
-DCERES_HAVE_PTHREAD
- -D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
- -D"CERES_HASH_NAMESPACE_END=}}"
-DCERES_NO_SUITESPARSE
-DCERES_NO_CXSPARSE
-DCERES_NO_PROTOCOL_BUFFERS
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
)
+if(MSVC10)
+ add_definitions(
+ -D"CERES_HASH_NAMESPACE_START=namespace std {"
+ -D"CERES_HASH_NAMESPACE_END=}"
+ )
+else()
+ add_definitions(
+ -D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
+ -D"CERES_HASH_NAMESPACE_END=}}"
+ )
+endif()
+
if(APPLE)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5")
add_definitions(
diff --git a/extern/libmv/third_party/ceres/patches/msvc_glog_fix.patch b/extern/libmv/third_party/ceres/patches/msvc_glog_fix.patch
new file mode 100644
index 00000000000..f3200fb8e0a
--- /dev/null
+++ b/extern/libmv/third_party/ceres/patches/msvc_glog_fix.patch
@@ -0,0 +1,50 @@
+diff --git a/internal/ceres/block_random_access_dense_matrix.cc b/internal/ceres/block_random_access_dense_matrix.cc
+index aedfc74..0f95e89 100644
+--- a/internal/ceres/block_random_access_dense_matrix.cc
++++ b/internal/ceres/block_random_access_dense_matrix.cc
+@@ -28,12 +28,12 @@
+ //
+ // Author: sameeragarwal@google.com (Sameer Agarwal)
+
++#include "glog/logging.h"
+ #include "ceres/block_random_access_dense_matrix.h"
+
+ #include <vector>
+ #include "ceres/internal/eigen.h"
+ #include "ceres/internal/scoped_ptr.h"
+-#include "glog/logging.h"
+
+ namespace ceres {
+ namespace internal {
+diff --git a/internal/ceres/block_random_access_sparse_matrix.cc b/internal/ceres/block_random_access_sparse_matrix.cc
+index f789436..9ed62ce 100644
+--- a/internal/ceres/block_random_access_sparse_matrix.cc
++++ b/internal/ceres/block_random_access_sparse_matrix.cc
+@@ -28,6 +28,7 @@
+ //
+ // Author: sameeragarwal@google.com (Sameer Agarwal)
+
++#include "glog/logging.h"
+ #include "ceres/block_random_access_sparse_matrix.h"
+
+ #include <algorithm>
+@@ -39,7 +40,6 @@
+ #include "ceres/mutex.h"
+ #include "ceres/triplet_sparse_matrix.h"
+ #include "ceres/types.h"
+-#include "glog/logging.h"
+
+ namespace ceres {
+ namespace internal {
+diff --git a/internal/ceres/schur_complement_solver.cc b/internal/ceres/schur_complement_solver.cc
+index b9224d8..2cbe78d 100644
+--- a/internal/ceres/schur_complement_solver.cc
++++ b/internal/ceres/schur_complement_solver.cc
+@@ -38,6 +38,7 @@
+ #endif // CERES_NO_CXSPARSE
+
+ #include "Eigen/Dense"
++#include "glog/logging.h"
+ #include "ceres/block_random_access_dense_matrix.h"
+ #include "ceres/block_random_access_matrix.h"
+ #include "ceres/block_random_access_sparse_matrix.h"
diff --git a/extern/libmv/third_party/ceres/patches/series b/extern/libmv/third_party/ceres/patches/series
index 3e65145696d..6386e49220a 100644
--- a/extern/libmv/third_party/ceres/patches/series
+++ b/extern/libmv/third_party/ceres/patches/series
@@ -1 +1,2 @@
collections_port.h.mingw.patch
+msvc_glog_fix.patch