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:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 20 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 748ed649800..c0ea2ef679e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -365,7 +365,9 @@ 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)
+option(WITH_SYSTEM_GFLOG "Use system-wide Glog instead of a bundled one" OFF)
mark_as_advanced(WITH_SYSTEM_GFLAGS)
+mark_as_advanced(WITH_SYSTEM_GLOG)
# Freestyle
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
@@ -1339,9 +1341,24 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
set(GFLAGS_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/extern/gflags/src")
endif()
- set(GLOG_DEFINES
- -DGOOGLE_GLOG_DLL_DECL=
- )
+ if(WITH_SYSTEM_GLOG)
+ find_package(Glog)
+ if(NOT GLOG_FOUND)
+ message(FATAL_ERROR "System wide Glog is requested but was not found")
+ endif()
+ # FindGlog does not define this, and we are not even sure what to use here.
+ set(GLOG_DEFINES)
+ else()
+ set(GLOG_DEFINES
+ -DGOOGLE_GLOG_DLL_DECL=
+ )
+ set(GLOG_LIBRARIES extern_glog)
+ if(WIN32)
+ set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src/windows)
+ else()
+ set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src)
+ endif()
+ endif()
endif()
#-----------------------------------------------------------------------------