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:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-04-21 15:19:05 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-21 15:19:05 +0300
commit81011679ddb1fc57e37fe1ba2eb494a1dedaa0fd (patch)
tree54dc7feaf7fbcfbb45891a61bef5113af508696a /CMakeLists.txt
parentbfa888cef28955501195dfbee002bc793685e527 (diff)
parent9c02990ac13a25968d8ec15da15129617d3f25d0 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt28
1 files changed, 22 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9789e563681..b926842f155 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -367,6 +367,10 @@ option(WITH_LIBMV "Enable Libmv structure from motion library" ON)
option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." OFF)
mark_as_advanced(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
+# Logging/unbit test libraries.
+option(WITH_SYSTEM_GFLAGS "Use system-wide Gflags instead of a bundled one" OFF)
+mark_as_advanced(WITH_SYSTEM_GFLAGS)
+
# Freestyle
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
@@ -1311,15 +1315,27 @@ endif()
# Configure GLog/GFlags
if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
+ if(WITH_SYSTEM_GFLAGS)
+ find_package(Gflags)
+ if(NOT GFLAGS_FOUND)
+ message(FATAL_ERROR "System wide Gflags is requested but was not found")
+ endif()
+ # FindGflags does not define this, and we are not even sure what to use here.
+ set(GFLAGS_DEFINES)
+ else()
+ set(GFLAGS_DEFINES
+ -DGFLAGS_DLL_DEFINE_FLAG=
+ -DGFLAGS_DLL_DECLARE_FLAG=
+ -DGFLAGS_DLL_DECL=
+ )
+ set(GFLAGS_NAMESPACE "gflags")
+ set(GFLAGS_LIBRARIES extern_gflags)
+ set(GFLAGS_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/extern/gflags/src")
+ endif()
+
set(GLOG_DEFINES
-DGOOGLE_GLOG_DLL_DECL=
)
-
- set(GFLAGS_DEFINES
- -DGFLAGS_DLL_DEFINE_FLAG=
- -DGFLAGS_DLL_DECLARE_FLAG=
- -DGFLAGS_DLL_DECL=
- )
endif()
#-----------------------------------------------------------------------------