gentoo-overlay/media-gfx/blender/files/04-blender-2.68-unbundle-glog.patch

105 lines
3.3 KiB
Diff

commit 26e853d31931a8bb08695aa98ae53b263236d407
Author: hasufell <hasufell@gentoo.org>
Date: Fri Jul 19 18:40:23 2013 +0200
unbundle glog/gflags
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1a7830..a30831c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,14 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
#-----------------------------------------------------------------------------
+# Check for some modules
+if(UNIX)
+ find_package(PkgConfig)
+ pkg_check_modules(_PC_GFLAGS libgflags)
+ pkg_check_modules(_PC_GLOG libglog)
+endif()
+
+#-----------------------------------------------------------------------------
# Set default config options
get_blender_version()
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt
index 2c9a219..7061e04 100644
--- a/extern/libmv/CMakeLists.txt
+++ b/extern/libmv/CMakeLists.txt
@@ -88,9 +88,6 @@ if(WITH_LIBMV)
third_party/fast/fast_9.c
third_party/fast/fast.c
third_party/fast/nonmax.c
- third_party/gflags/gflags.cc
- third_party/gflags/gflags_completions.cc
- third_party/gflags/gflags_reporting.cc
libmv/base/id_generator.h
libmv/base/scoped_ptr.h
@@ -141,12 +138,6 @@ if(WITH_LIBMV)
libmv/tracking/trklt_region_tracker.h
third_party/fast/fast.h
- third_party/gflags/config.h
- third_party/gflags/gflags/gflags_completions.h
- third_party/gflags/gflags/gflags_declare.h
- third_party/gflags/gflags/gflags.h
- third_party/gflags/mutex.h
- third_party/gflags/util.h
third_party/msinttypes/inttypes.h
third_party/msinttypes/stdint.h
)
@@ -187,42 +178,6 @@ if(WITH_LIBMV)
third_party/msinttypes
)
endif()
- else()
- list(APPEND 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
- )
-
- list(APPEND INC
- third_party/glog/src
- )
endif()
add_definitions(
@@ -234,7 +189,9 @@ else()
)
endif()
+include_directories(${_PC_GFLAGS_INCLUDE_DIRS} ${_PC_GLOG_INCLUDE_DIRS})
blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}")
+target_link_libraries(extern_libmv ${_PC_GFLAGS_LIBRARIES} ${_PC_GLOG_LIBRARIES})
if(WITH_LIBMV)
add_subdirectory(third_party)