diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-21 17:30:24 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-21 17:30:24 +0300 |
commit | cc2d501642555616f3e8808bdbaa72f9c752e1a1 (patch) | |
tree | a204ffc2ad092c8ab6464ce7e609f885e5c7eaef /CMakeLists.txt | |
parent | 111a53f74ccf2cd53e41d7597dfecbab041858a3 (diff) | |
parent | 7e977470f3e3e082082debe8a8b266ffea8dada6 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b926842f155..13171ac2780 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -369,7 +369,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) @@ -1333,9 +1335,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() #----------------------------------------------------------------------------- |