summaryrefslogtreecommitdiff
blob: 4c9f14aea7c3dbcdf809fbc4b14ef90b26505eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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
@@ -87,10 +87,6 @@
 		libmv/tracking/track_region.cc
 		libmv/tracking/trklt_region_tracker.cc
 
-		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
 		libmv/base/vector.h
@@ -140,12 +136,6 @@
 		libmv/tracking/track_region.h
 		libmv/tracking/trklt_region_tracker.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
 	)
@@ -186,42 +176,6 @@
 				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()
 else()
 	list(APPEND SRC
@@ -229,7 +183,9 @@
 	)
 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)