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
path: root/extern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-03 13:07:30 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-04 17:39:13 +0300
commit69f40808390a4a761e414daebbfbeeacae342871 (patch)
tree54406f1c532bcc2661bb54b119cb0223d3291f4e /extern
parent8608a0f4f0e17e14d0b2d560914767c776778619 (diff)
Re-organize structure of GLog/GFlags CMake libraries
The idea is to split them into two separate targets and have dedicated include directories list for each of them in order to avoid some annoying include header modifications in comparison with upstream. Reviewers: campbellbarton, juicyfruit Differential Revision: https://developer.blender.org/D1706
Diffstat (limited to 'extern')
-rw-r--r--extern/libmv/CMakeLists.txt137
-rw-r--r--extern/libmv/ChangeLog59
-rwxr-xr-xextern/libmv/bundle.sh111
-rw-r--r--extern/libmv/files.txt1
-rwxr-xr-xextern/libmv/mkfiles.sh6
-rw-r--r--extern/libmv/third_party/CMakeLists.txt8
-rw-r--r--extern/libmv/third_party/gflags/CMakeLists.txt54
-rw-r--r--extern/libmv/third_party/gflags/README.libmv5
-rw-r--r--extern/libmv/third_party/gflags/README.md270
-rw-r--r--extern/libmv/third_party/gflags/gflags/gflags.h2
-rw-r--r--extern/libmv/third_party/gflags/gflags/gflags_declare.h4
-rw-r--r--extern/libmv/third_party/glog/AUTHORS18
-rw-r--r--extern/libmv/third_party/glog/CMakeLists.txt89
-rw-r--r--extern/libmv/third_party/glog/README.libmv2
-rw-r--r--extern/libmv/third_party/glog/src/base/commandlineflags.h2
-rw-r--r--extern/libmv/third_party/glog/src/base/mutex.h2
-rw-r--r--extern/libmv/third_party/glog/src/windows/glog/logging.h11
-rw-r--r--extern/libmv/third_party/glog/src/windows/port.cc2
-rw-r--r--extern/libmv/third_party/glog/src/windows/port.h2
19 files changed, 527 insertions, 258 deletions
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt
index fd559c86846..a222c22447f 100644
--- a/extern/libmv/CMakeLists.txt
+++ b/extern/libmv/CMakeLists.txt
@@ -37,10 +37,28 @@ set(SRC
libmv-capi.h
)
-if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
+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()
+
+add_definitions(-DGOOGLE_GLOG_DLL_DECL=)
+add_definitions(-DGFLAGS_DLL_DEFINE_FLAG=)
+add_definitions(-DGFLAGS_DLL_DECLARE_FLAG=)
+add_definitions(-DGFLAGS_DLL_DECL=)
+
+add_subdirectory(third_party)
+
+if(WITH_LIBMV)
list(APPEND INC
third_party/gflags
- third_party/gflags/gflags
third_party/glog/src
third_party/ceres/include
third_party/ceres/config
@@ -53,37 +71,10 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
${ZLIB_INCLUDE_DIRS}
)
- if(WIN32)
- list(APPEND INC
- third_party/glog/src/windows
- )
-
- if(NOT MINGW)
- list(APPEND INC
- third_party/msinttypes
- )
- endif()
- endif()
-
add_definitions(
-DWITH_LIBMV_GUARDED_ALLOC
- -DGOOGLE_GLOG_DLL_DECL=
-DLIBMV_NO_FAST_DETECTOR=
)
-endif()
-
-if(WITH_LIBMV)
- 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()
list(APPEND SRC
intern/autotrack.cc
@@ -260,91 +251,3 @@ else()
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.
-if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
- # We compile GLog together with GFlag so we don't worry about
- # adding extra lib to linker.
- set(GLOG_SRC
- third_party/gflags/gflags.cc
- third_party/gflags/gflags_completions.cc
- third_party/gflags/gflags_reporting.cc
-
- third_party/gflags/config.h
- third_party/gflags/gflags/gflags_completions.h
- third_party/gflags/gflags/gflags_declare.h
- third_party/gflags/gflags/gflags_gflags.h
- third_party/gflags/gflags/gflags.h
- third_party/gflags/mutex.h
- third_party/gflags/util.h
- )
-
- if(WIN32)
- list(APPEND GLOG_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
-
- third_party/gflags/windows_port.cc
- third_party/gflags/windows_port.h
- )
- else()
- list(APPEND GLOG_SRC
- third_party/glog/src/demangle.cc
- third_party/glog/src/logging.cc
- third_party/glog/src/raw_logging.cc
- third_party/glog/src/signalhandler.cc
- third_party/glog/src/symbolize.cc
- third_party/glog/src/utilities.cc
- third_party/glog/src/vlog_is_on.cc
-
- third_party/glog/src/base/commandlineflags.h
- third_party/glog/src/base/googleinit.h
- third_party/glog/src/base/mutex.h
- third_party/glog/src/config_freebsd.h
- third_party/glog/src/config.h
- third_party/glog/src/config_hurd.h
- third_party/glog/src/config_linux.h
- third_party/glog/src/config_mac.h
- third_party/glog/src/demangle.h
- third_party/glog/src/glog/logging.h
- third_party/glog/src/glog/log_severity.h
- third_party/glog/src/glog/raw_logging.h
- third_party/glog/src/glog/vlog_is_on.h
- third_party/glog/src/stacktrace_generic-inl.h
- third_party/glog/src/stacktrace.h
- third_party/glog/src/stacktrace_libunwind-inl.h
- third_party/glog/src/stacktrace_powerpc-inl.h
- third_party/glog/src/stacktrace_x86_64-inl.h
- third_party/glog/src/stacktrace_x86-inl.h
- third_party/glog/src/symbolize.h
- third_party/glog/src/utilities.h
- )
- endif()
-
- blender_add_lib(extern_glog "${GLOG_SRC}" "${INC}" "${INC_SYS}")
-endif()
diff --git a/extern/libmv/ChangeLog b/extern/libmv/ChangeLog
index e04defd1e1a..63c9963a22f 100644
--- a/extern/libmv/ChangeLog
+++ b/extern/libmv/ChangeLog
@@ -1,3 +1,25 @@
+commit d3537e3709fe11f42312e82cb1c9837c9e742385
+Author: Sergey Sharybin <sergey.vfx@gmail.com>
+Date: Sun Jan 3 14:17:10 2016 +0500
+
+ GLog/GFlags: Reduce difference between upstream and bundled versions
+
+ Several things here:
+
+ - Re-bundled sources using own fork with pull-requests applied on the sources.
+
+ - Got rid of changes around include "config.h", it was needed by Blender to
+ make it's include directories configuration to work. This could be addressed
+ differently from Blender side.
+
+ - Moved some customization to defines set by CMakeLists.
+
+commit 1ec37bba2cfbbf0d6568429fa3035ee2164c23e6
+Author: Sergey Sharybin <sergey.vfx@gmail.com>
+Date: Sat Jan 2 12:42:55 2016 +0500
+
+ GFlags linking errors fix for MSVC
+
commit df7642b270e8e43685e9ffb404b59d7b226a9f60
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Dec 31 17:56:12 2015 +0500
@@ -585,40 +607,3 @@ Date: Thu Apr 17 18:42:43 2014 +0600
Should prevent accidents like that one happened recently
with crashing Blender after Libmv re-integration.
-
-commit e1fe41b6604771ba769a9b15eb2f489fbf7af251
-Author: Sergey Sharybin <sergey.vfx@gmail.com>
-Date: Thu Apr 17 17:52:23 2014 +0600
-
- Fix offset array not being properly allocated
-
- We really do need unit test for buffer (un)distortion,
- didn't notice this bug for until new Libmv has been
- integrated into Blender.
-
-commit ee21415a353396df67ef21e82adaffab2a8d2a0a
-Author: Sergey Sharybin <sergey.vfx@gmail.com>
-Date: Thu Apr 17 16:26:12 2014 +0600
-
- Support multiple distortion models, including a new division model
-
- This commit makes it so CameraIntrinsics is no longer hardcoded
- to use the traditional polynomial radial distortion model. Currently
- the distortion code has generic logic which is shared between
- different distortion models, but had no other models until now.
-
- This moves everything specific to the polynomial radial distortion
- to a subclass PolynomialDistortionCameraIntrinsics(), and adds a
- new division distortion model suitable for cameras such as the
- GoPro which have much stronger distortion due to their fisheye lens.
-
- This also cleans up the internal API of CameraIntrinsics to make
- it easier to understand and reduces old C-style code.
-
- Reviewers: keir
-
- Reviewed By: keir
-
- CC: jta
-
- Differential Revision: https://developer.blender.org/D335
diff --git a/extern/libmv/bundle.sh b/extern/libmv/bundle.sh
index e9fb33e5930..53686f43546 100755
--- a/extern/libmv/bundle.sh
+++ b/extern/libmv/bundle.sh
@@ -16,9 +16,13 @@ git clone -b $BRANCH $repo $tmp/libmv
git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log -n 50 > ChangeLog
-find libmv -type f -not -iwholename '*.svn*' -exec rm -rf {} \;
-find third_party -type f -not -iwholename '*.svn*' -not -iwholename '*third_party/ceres*' \
+find libmv -type f -exec rm -rf {} \;
+find third_party -type f \
+ -not -iwholename '*third_party/ceres*' \
+ -not -iwholename '*third_party/SConscript*' \
-not -iwholename '*third_party/CMakeLists.txt*' \
+ -not -iwholename '*third_party/gflags/CMakeLists.txt*' \
+ -not -iwholename '*third_party/glog/CMakeLists.txt*' \
-exec rm -rf {} \;
cat "files.txt" | while read f; do
@@ -130,10 +134,28 @@ set(SRC
libmv-capi.h
)
-if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
+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()
+
+add_definitions(-DGOOGLE_GLOG_DLL_DECL=)
+add_definitions(-DGFLAGS_DLL_DEFINE_FLAG=)
+add_definitions(-DGFLAGS_DLL_DECLARE_FLAG=)
+add_definitions(-DGFLAGS_DLL_DECL=)
+
+add_subdirectory(third_party)
+
+if(WITH_LIBMV)
list(APPEND INC
third_party/gflags
- third_party/gflags/gflags
third_party/glog/src
third_party/ceres/include
third_party/ceres/config
@@ -146,37 +168,10 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
\${ZLIB_INCLUDE_DIRS}
)
- if(WIN32)
- list(APPEND INC
- third_party/glog/src/windows
- )
-
- if(NOT MINGW)
- list(APPEND INC
- third_party/msinttypes
- )
- endif()
- endif()
-
add_definitions(
-DWITH_LIBMV_GUARDED_ALLOC
- -DGOOGLE_GLOG_DLL_DECL=
-DLIBMV_NO_FAST_DETECTOR=
)
-endif()
-
-if(WITH_LIBMV)
- 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()
list(APPEND SRC
intern/autotrack.cc
@@ -222,58 +217,4 @@ else()
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.
-if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
- # 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
- 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
-
- third_party/gflags/windows_port.cc
- third_party/gflags/windows_port.h
- )
- else()
- list(APPEND GLOG_SRC
-${third_glog_sources}
-
-${third_glog_headers}
- )
- endif()
-
- blender_add_lib(extern_glog "\${GLOG_SRC}" "\${INC}" "\${INC_SYS}")
-endif()
EOF
diff --git a/extern/libmv/files.txt b/extern/libmv/files.txt
index 427ff86dc04..d3a7993ea6b 100644
--- a/extern/libmv/files.txt
+++ b/extern/libmv/files.txt
@@ -147,6 +147,7 @@ third_party/gflags/gflags_reporting.cc
third_party/gflags/mutex.h
third_party/gflags/NEWS.txt
third_party/gflags/README.libmv
+third_party/gflags/README.md
third_party/gflags/util.h
third_party/gflags/windows_port.cc
third_party/gflags/windows_port.h
diff --git a/extern/libmv/mkfiles.sh b/extern/libmv/mkfiles.sh
index c7c8c33f725..281d07cd839 100755
--- a/extern/libmv/mkfiles.sh
+++ b/extern/libmv/mkfiles.sh
@@ -1,4 +1,8 @@
#!/bin/sh
find ./libmv/ -type f | sed -r 's/^\.\///' | sort > files.txt
-find ./third_party/ -mindepth 2 -type f | grep -v third_party/ceres | sed -r 's/^\.\///' | sort >> files.txt
+find ./third_party/ -mindepth 2 -type f | \
+ grep -v third_party/ceres | \
+ grep -v third_party/gflags/CMakeLists.txt | \
+ grep -v third_party/glog/CMakeLists.txt | \
+ sed -r 's/^\.\///' | sort >> files.txt
diff --git a/extern/libmv/third_party/CMakeLists.txt b/extern/libmv/third_party/CMakeLists.txt
index 6212fe480b1..660b39e3d53 100644
--- a/extern/libmv/third_party/CMakeLists.txt
+++ b/extern/libmv/third_party/CMakeLists.txt
@@ -1,2 +1,8 @@
+if(WITH_LIBMV)
+ add_subdirectory(ceres)
+endif()
-add_subdirectory(ceres)
+if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
+ add_subdirectory(gflags)
+ add_subdirectory(glog)
+endif()
diff --git a/extern/libmv/third_party/gflags/CMakeLists.txt b/extern/libmv/third_party/gflags/CMakeLists.txt
new file mode 100644
index 00000000000..99e2898e131
--- /dev/null
+++ b/extern/libmv/third_party/gflags/CMakeLists.txt
@@ -0,0 +1,54 @@
+# ***** 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) 2016, Blender Foundation
+# All rights reserved.
+#
+# Contributor(s): Blender Foundation,
+# Sergey Sharybin
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+ .
+ gflags
+)
+
+set(INC_SYS
+)
+
+set(SRC
+ gflags.cc
+ gflags_completions.cc
+ gflags_reporting.cc
+
+ config.h
+ gflags/gflags_completions.h
+ gflags/gflags_declare.h
+ gflags/gflags_gflags.h
+ gflags/gflags.h
+ mutex.h
+ util.h
+)
+
+if(WIN32)
+ list(APPEND SRC
+ windows_port.cc
+ windows_port.h
+ )
+endif()
+
+blender_add_lib(extern_gflags "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/extern/libmv/third_party/gflags/README.libmv b/extern/libmv/third_party/gflags/README.libmv
index f4310b39bbb..bf58ccb5fd2 100644
--- a/extern/libmv/third_party/gflags/README.libmv
+++ b/extern/libmv/third_party/gflags/README.libmv
@@ -1,7 +1,7 @@
Project: Google Flags
URL: http://code.google.com/p/google-gflags/
License: New BSD
-Upstream version: 2.1.1
+Upstream version: 2.2.0 (9db82895)
Local modifications:
- Flattened the tree and only included files needed for libmv.
@@ -15,4 +15,5 @@ Local modifications:
- Removed attribute(unused) from FlagSaver.
- TODO(keir): Import and use gflags for Windows from upstream.
+- Applied some modifications from fork https://github.com/Nazg-Gul/gflags.git
+ (see https://github.com/gflags/gflags/pull/129)
diff --git a/extern/libmv/third_party/gflags/README.md b/extern/libmv/third_party/gflags/README.md
new file mode 100644
index 00000000000..79bd2028603
--- /dev/null
+++ b/extern/libmv/third_party/gflags/README.md
@@ -0,0 +1,270 @@
+24 March 2015
+-------------
+
+I've just released gflags 2.1.2.
+
+This release completes the namespace change fixes. In particular,
+it restores binary ABI compatibility with release version 2.0.
+The deprecated "google" namespace is by default still kept as
+primary namespace while symbols are imported into the new "gflags" namespace.
+This can be overridden using the CMake variable GFLAGS_NAMESPACE.
+
+Other fixes of the build configuration are related to the (patched)
+CMake modules FindThreads.cmake and CheckTypeSize.cmake. These have
+been removed and instead the C language is enabled again even though
+gflags is written in C++ only.
+
+This release also marks the complete move of the gflags project
+from Google Code to GitHub. Email addresses of original issue
+reporters got lost in the process. Given the age of most issue reports,
+this should be negligable.
+
+Please report any further issues using the GitHub issue tracker.
+
+
+30 March 2014
+-------------
+
+I've just released gflags 2.1.1.
+
+This release fixes a few bugs in the configuration of gflags\_declare.h
+and adds a separate GFLAGS\_INCLUDE\_DIR CMake variable to the build configuration.
+Setting GFLAGS\_NAMESPACE to "google" no longer changes also the include
+path of the public header files. This allows the use of the library with
+other Google projects such as glog which still use the deprecated "google"
+namespace for the gflags library, but include it as "gflags/gflags.h".
+
+20 March 2014
+-------------
+
+I've just released gflags 2.1.
+
+The major changes are the use of CMake for the build configuration instead
+of the autotools and packaging support through CPack. The default namespace
+of all C++ symbols is now "gflags" instead of "google". This can be
+configured via the GFLAGS\_NAMESPACE variable.
+
+This release compiles with all major compilers without warnings and passed
+the unit tests on Ubuntu 12.04, Windows 7 (Visual Studio 2008 and 2010,
+Cygwin, MinGW), and Mac OS X (Xcode 5.1).
+
+The SVN repository on Google Code is now frozen and replaced by a Git
+repository such that it can be used as Git submodule by projects. The main
+hosting of this project remains at Google Code. Thanks to the distributed
+character of Git, I can push (and pull) changes from both GitHub and Google Code
+in order to keep the two public repositories in sync.
+When fixing an issue for a pull request through either of these hosting
+platforms, please reference the issue number as
+[described here](https://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control).
+For the further development, I am following the
+[Git branching model](http://nvie.com/posts/a-successful-git-branching-model/)
+with feature branch names prefixed by "feature/" and bugfix branch names
+prefixed by "bugfix/", respectively.
+
+Binary and source [packages](https://github.com/schuhschuh/gflags/releases) are available on GitHub.
+
+
+14 January 2014
+---------------
+
+The migration of the build system to CMake is almost complete.
+What remains to be done is rewriting the tests in Python such they can be
+executed on non-Unix platforms and splitting them up into separate CTest tests.
+Though merging these changes into the master branch yet remains to be done,
+it is recommended to already start using the
+[cmake-migration](https://github.com/schuhschuh/gflags/tree/cmake-migration) branch.
+
+
+20 April 2013
+-------------
+
+More than a year has past since I (Andreas) took over the maintenance for
+`gflags`. Only few minor changes have been made since then, much to my regret.
+To get more involved and stimulate participation in the further
+development of the library, I moved the project source code today to
+[GitHub](https://github.com/schuhschuh/gflags).
+I believe that the strengths of [Git](http://git-scm.com/) will allow for better community collaboration
+as well as ease the integration of changes made by others. I encourage everyone
+who would like to contribute to send me pull requests.
+Git's lightweight feature branches will also provide the right tool for more
+radical changes which should only be merged back into the master branch
+after these are complete and implement the desired behavior.
+
+The SVN repository remains accessible at Google Code and I will keep the
+master branch of the Git repository hosted at GitHub and the trunk of the
+Subversion repository synchronized. Initially, I was going to simply switch the
+Google Code project to Git, but in this case the SVN repository would be
+frozen and force everyone who would like the latest development changes to
+use Git as well. Therefore I decided to host the public Git repository at GitHub
+instead.
+
+Please continue to report any issues with gflags on Google Code. The GitHub project will
+only be used to host the Git repository.
+
+One major change of the project structure I have in mind for the next weeks
+is the migration from autotools to [CMake](http://www.cmake.org/).
+Check out the (unstable!)
+[cmake-migration](https://github.com/schuhschuh/gflags/tree/cmake-migration)
+branch on GitHub for details.
+
+
+25 January 2012
+---------------
+
+I've just released gflags 2.0.
+
+The `google-gflags` project has been renamed to `gflags`. I
+(csilvers) am stepping down as maintainer, to be replaced by Andreas
+Schuh. Welcome to the team, Andreas! I've seen the energy you have
+around gflags and the ideas you have for the project going forward,
+and look forward to having you on the team.
+
+I bumped the major version number up to 2 to reflect the new community
+ownership of the project. All the [changes](ChangeLog.txt)
+are related to the renaming. There are no functional changes from
+gflags 1.7. In particular, I've kept the code in the namespace
+`google`, though in a future version it should be renamed to `gflags`.
+I've also kept the `/usr/local/include/google/` subdirectory as
+synonym of `/usr/local/include/gflags/`, though the former name has
+been obsolete for some time now.
+
+
+18 January 2011
+---------------
+
+The `google-gflags` Google Code page has been renamed to
+`gflags`, in preparation for the project being renamed to
+`gflags`. In the coming weeks, I'll be stepping down as
+maintainer for the gflags project, and as part of that Google is
+relinquishing ownership of the project; it will now be entirely
+community run. The name change reflects that shift.
+
+
+20 December 2011
+----------------
+
+I've just released gflags 1.7. This is a minor release; the major
+change is that `CommandLineFlagInfo` now exports the address in memory
+where the flag is located. There has also been a bugfix involving
+very long --help strings, and some other minor [changes](ChangeLog.txt).
+
+29 July 2011
+------------
+
+I've just released gflags 1.6. The major new feature in this release
+is support for setting version info, so that --version does something
+useful.
+
+One minor change has required bumping the library number:
+`ReparseCommandlineFlags` now returns `void` instead of `int` (the int
+return value was always meaningless). Though I doubt anyone ever used
+this (meaningless) return value, technically it's a change to the ABI
+that requires a version bump. A bit sad.
+
+There's also a procedural change with this release: I've changed the
+internal tools used to integrate Google-supplied patches for gflags
+into the opensource release. These new tools should result in more
+frequent updates with better change descriptions. They will also
+result in future `ChangeLog` entries being much more verbose (for better
+or for worse).
+
+See the [ChangeLog](ChangeLog.txt) for a full list of changes for this release.
+
+24 January 2011
+---------------
+
+I've just released gflags 1.5. This release has only minor changes
+from 1.4, including some slightly better reporting in --help, and
+an new memory-cleanup function that can help when running gflags-using
+libraries under valgrind. The major change is to fix up the macros
+(`DEFINE_bool` and the like) to work more reliably inside namespaces.
+
+If you have not had a problem with these macros, and don't need any of
+the other changes described, there is no need to upgrade. See the
+[ChangeLog](ChangeLog.txt) for a full list of changes for this release.
+
+11 October 2010
+---------------
+
+I've just released gflags 1.4. This release has only minor changes
+from 1.3, including some documentation tweaks and some work to make
+the library smaller. If 1.3 is working well for you, there's no
+particular reason to upgrade.
+
+4 January 2010
+--------------
+
+I've just released gflags 1.3. gflags now compiles under MSVC, and
+all tests pass. I **really** never thought non-unix-y Windows folks
+would want gflags, but at least some of them do.
+
+The major news, though, is that I've separated out the python package
+into its own library, [python-gflags](http://code.google.com/p/python-gflags).
+If you're interested in the Python version of gflags, that's the place to
+get it now.
+
+10 September 2009
+-----------------
+
+I've just released gflags 1.2. The major change from gflags 1.1 is it
+now compiles under MinGW (as well as cygwin), and all tests pass. I
+never thought Windows folks would want unix-style command-line flags,
+since they're so different from the Windows style, but I guess I was
+wrong!
+
+The other changes are minor, such as support for --htmlxml in the
+python version of gflags.
+
+15 April 2009
+-------------
+
+I've just released gflags 1.1. It has only minor changes fdrom gflags
+1.0 (see the [ChangeLog](ChangeLog.txt) for details).
+The major change is that I moved to a new system for creating .deb and .rpm files.
+This allows me to create x86\_64 deb and rpm files.
+
+In the process of moving to this new system, I noticed an
+inconsistency: the tar.gz and .rpm files created libraries named
+libgflags.so, but the deb file created libgoogle-gflags.so. I have
+fixed the deb file to create libraries like the others. I'm no expert
+in debian packaging, but I believe this has caused the package name to
+change as well. Please let me know (at
+[[mailto:google-gflags@googlegroups.com](mailto:google-gflags@googlegroups.com)
+google-gflags@googlegroups.com]) if this causes problems for you --
+especially if you know of a fix! I would be happy to change the deb
+packages to add symlinks from the old library name to the new
+(libgoogle-gflags.so -> libgflags.so), but that is beyond my knowledge
+of how to make .debs.
+
+If you've tried to install a .rpm or .deb and it doesn't work for you,
+let me know. I'm excited to finally have 64-bit package files, but
+there may still be some wrinkles in the new system to iron out.
+
+1 October 2008
+--------------
+
+gflags 1.0rc2 was out for a few weeks without any issues, so gflags
+1.0 is now released. This is much like gflags 0.9. The major change
+is that the .h files have been moved from `/usr/include/google` to
+`/usr/include/gflags`. While I have backwards-compatibility
+forwarding headeds in place, please rewrite existing code to say
+```
+ #include <gflags/gflags.h>
+```
+instead of
+```
+ #include <google/gflags.h>
+```
+
+I've kept the default namespace to google. You can still change with
+with the appropriate flag to the configure script (`./configure
+--help` to see the flags). If you have feedback as to whether the
+default namespace should change to gflags, which would be a
+non-backwards-compatible change, send mail to
+`google-gflags@googlegroups.com`!
+
+Version 1.0 also has some neat new features, like support for bash
+commandline-completion of help flags. See the [ChangeLog](ChangeLog.txt)
+for more details.
+
+If I don't hear any bad news for a few weeks, I'll release 1.0-final.
diff --git a/extern/libmv/third_party/gflags/gflags/gflags.h b/extern/libmv/third_party/gflags/gflags/gflags.h
index 5e04772c9a3..357eec6be7c 100644
--- a/extern/libmv/third_party/gflags/gflags/gflags.h
+++ b/extern/libmv/third_party/gflags/gflags/gflags.h
@@ -86,7 +86,7 @@
// We always want to export variables defined in user code
#ifndef GFLAGS_DLL_DEFINE_FLAG
-# if 0 && defined(_MSC_VER)
+# ifdef _MSC_VER
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
# else
# define GFLAGS_DLL_DEFINE_FLAG
diff --git a/extern/libmv/third_party/gflags/gflags/gflags_declare.h b/extern/libmv/third_party/gflags/gflags/gflags_declare.h
index 197197dcbc9..9b85f46cfdc 100644
--- a/extern/libmv/third_party/gflags/gflags/gflags_declare.h
+++ b/extern/libmv/third_party/gflags/gflags/gflags_declare.h
@@ -47,7 +47,7 @@
// We always want to import the symbols of the gflags library
#ifndef GFLAGS_DLL_DECL
-# if 0 && defined(_MSC_VER)
+# if 1 && defined(_MSC_VER)
# define GFLAGS_DLL_DECL __declspec(dllimport)
# else
# define GFLAGS_DLL_DECL
@@ -56,7 +56,7 @@
// We always want to import variables declared in user code
#ifndef GFLAGS_DLL_DECLARE_FLAG
-# if 0 && defined(_MSC_VER)
+# ifdef _MSC_VER
# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
# else
# define GFLAGS_DLL_DECLARE_FLAG
diff --git a/extern/libmv/third_party/glog/AUTHORS b/extern/libmv/third_party/glog/AUTHORS
index ee92be88dcf..72959a02585 100644
--- a/extern/libmv/third_party/glog/AUTHORS
+++ b/extern/libmv/third_party/glog/AUTHORS
@@ -1,2 +1,18 @@
-opensource@google.com
+# This is the official list of glog authors for copyright purposes.
+# This file is distinct from the CONTRIBUTORS files.
+# See the latter for an explanation.
+#
+# Names should be added to this file as:
+# Name or Organization <email address>
+# The email address is not required for organizations.
+#
+# Please keep the list sorted.
+Abhishek Parmar <abhishek@orng.net>
+Brian Silverman <bsilver16384@gmail.com>
+Google Inc.
+Michael Tanner <michael@tannertaxpro.com>
+romange <romange@users.noreply.github.com>
+Sergiu Dotenco <sergiu.dotenco@th-nuernberg.de>
+tbennun <tbennun@gmail.com>
+Teddy Reed <teddy@prosauce.org>
diff --git a/extern/libmv/third_party/glog/CMakeLists.txt b/extern/libmv/third_party/glog/CMakeLists.txt
new file mode 100644
index 00000000000..469df11e94b
--- /dev/null
+++ b/extern/libmv/third_party/glog/CMakeLists.txt
@@ -0,0 +1,89 @@
+# ***** 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) 2016, Blender Foundation
+# All rights reserved.
+#
+# Contributor(s): Blender Foundation,
+# Sergey Sharybin
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+ src
+ ../gflags
+)
+
+set(INC_SYS
+)
+
+set(SRC
+ src/logging.cc
+ src/raw_logging.cc
+ src/utilities.cc
+ src/vlog_is_on.cc
+
+ src/utilities.h
+
+ src/config.h
+ src/config_freebsd.h
+ src/config_hurd.h
+ src/config_linux.h
+ src/config_mac.h
+
+ src/base/commandlineflags.h
+ src/base/googleinit.h
+ src/base/mutex.h
+
+ src/stacktrace.h
+ src/stacktrace_generic-inl.h
+ src/stacktrace_libunwind-inl.h
+ src/stacktrace_powerpc-inl.h
+ src/stacktrace_x86_64-inl.h
+ src/stacktrace_x86-inl.h
+)
+
+if(WIN32)
+ list(APPEND SRC
+ src/windows/port.cc
+
+ src/windows/glog/raw_logging.h
+ src/windows/glog/vlog_is_on.h
+ src/windows/glog/logging.h
+ src/windows/glog/log_severity.h
+ src/windows/port.h
+ src/windows/config.h
+ )
+
+ list(APPEND INC
+ src/windows
+ )
+else()
+ list(APPEND SRC
+ src/demangle.cc
+ src/signalhandler.cc
+ src/symbolize.cc
+
+ src/demangle.h
+ src/glog/logging.h
+ src/glog/log_severity.h
+ src/glog/raw_logging.h
+ src/glog/vlog_is_on.h
+ src/symbolize.h
+ )
+endif()
+
+blender_add_lib(extern_glog "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/extern/libmv/third_party/glog/README.libmv b/extern/libmv/third_party/glog/README.libmv
index 43ee532b6eb..6e82cbbacdf 100644
--- a/extern/libmv/third_party/glog/README.libmv
+++ b/extern/libmv/third_party/glog/README.libmv
@@ -5,3 +5,5 @@ Upstream version: 0.3.4, 4d391fe
Local modifications:
* Added per-platform config.h files so no configuration-time
checks for functions and so are needed.
+* Applied changes from a fork https://github.com/Nazg-Gul/glog
+ (see https://github.com/google/glog/pull/81)
diff --git a/extern/libmv/third_party/glog/src/base/commandlineflags.h b/extern/libmv/third_party/glog/src/base/commandlineflags.h
index 529540ea461..c8d50890269 100644
--- a/extern/libmv/third_party/glog/src/base/commandlineflags.h
+++ b/extern/libmv/third_party/glog/src/base/commandlineflags.h
@@ -48,7 +48,7 @@
#ifndef BASE_COMMANDLINEFLAGS_H__
#define BASE_COMMANDLINEFLAGS_H__
-#include "../config.h"
+#include "config.h"
#include <string>
#include <string.h> // for memchr
#include <stdlib.h> // for getenv
diff --git a/extern/libmv/third_party/glog/src/base/mutex.h b/extern/libmv/third_party/glog/src/base/mutex.h
index 00da50580b3..ced2b9950ed 100644
--- a/extern/libmv/third_party/glog/src/base/mutex.h
+++ b/extern/libmv/third_party/glog/src/base/mutex.h
@@ -102,7 +102,7 @@
#ifndef GOOGLE_MUTEX_H_
#define GOOGLE_MUTEX_H_
-#include "../config.h" // to figure out pthreads support
+#include "config.h" // to figure out pthreads support
#if defined(NO_THREADS)
typedef int MutexType; // to keep a lock-count
diff --git a/extern/libmv/third_party/glog/src/windows/glog/logging.h b/extern/libmv/third_party/glog/src/windows/glog/logging.h
index fec5d7672cd..50135329d77 100644
--- a/extern/libmv/third_party/glog/src/windows/glog/logging.h
+++ b/extern/libmv/third_party/glog/src/windows/glog/logging.h
@@ -54,7 +54,7 @@
// Annoying stuff for windows -- makes sure clients can import these functions
#ifndef GOOGLE_GLOG_DLL_DECL
-# if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
+# if defined(_WIN32) && !defined(__CYGWIN__)
# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport)
# else
# define GOOGLE_GLOG_DLL_DECL
@@ -75,13 +75,13 @@
// Note: these commands below may look like "#if 1" or "#if 0", but
// that's because they were constructed that way at ./configure time.
// Look at logging.h.in to see how they're calculated (based on your config).
-#if 0
+#ifdef __MINGW32__
#include <stdint.h> // the normal place uint16_t is defined
#endif
-#if 0
+#ifdef __MINGW32__
#include <sys/types.h> // the normal place u_int16_t is defined
#endif
-#if 0
+#ifdef __MINGW32__
#include <inttypes.h> // a third place for uint16_t or u_int16_t
#endif
@@ -92,9 +92,6 @@
#ifdef __MINGW32__
# include <stdlib.h>
# include <unistd.h>
-# include <stdint.h> // the normal place uint16_t is defined
-# include <sys/types.h> // the normal place u_int16_t is defined
-# include <inttypes.h> // a third place for uint16_t or u_int16_t
# define _exit(x) exit(x)
#endif
diff --git a/extern/libmv/third_party/glog/src/windows/port.cc b/extern/libmv/third_party/glog/src/windows/port.cc
index a2f8395de1d..d9943254ee5 100644
--- a/extern/libmv/third_party/glog/src/windows/port.cc
+++ b/extern/libmv/third_party/glog/src/windows/port.cc
@@ -36,7 +36,7 @@
# error You should only be including windows/port.cc in a windows environment!
#endif
-#include "../config.h"
+#include "config.h"
#include <stdarg.h> // for va_list, va_start, va_end
#include <string.h> // for strstr()
#include <assert.h>
diff --git a/extern/libmv/third_party/glog/src/windows/port.h b/extern/libmv/third_party/glog/src/windows/port.h
index 3be525e8ce9..d78a1854f46 100644
--- a/extern/libmv/third_party/glog/src/windows/port.h
+++ b/extern/libmv/third_party/glog/src/windows/port.h
@@ -41,7 +41,7 @@
#ifndef CTEMPLATE_WINDOWS_PORT_H_
#define CTEMPLATE_WINDOWS_PORT_H_
-#include "../config.h"
+#include "config.h"
#ifdef _WIN32