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:
authorCampbell Barton <ideasman42@gmail.com>2015-03-19 07:41:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-19 07:41:41 +0300
commit4b88541d59302d4e65ecc66093a367091538c32d (patch)
tree57f6228286aa61a324f65d0ab7ad1cbd4d4cbef2 /CMakeLists.txt
parent2df4444deff15d7e1cb150a201e0ffc9b44d9fd1 (diff)
CMake: unbundle eigen3
Optionally use systems eigen3 library. T41989 by @hasufell with edits
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e54ddc9274..2e8552f2a1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,6 +261,10 @@ endif()
# (unix defaults to System OpenJPEG On)
option(WITH_SYSTEM_OPENJPEG "Use the operating systems OpenJPEG library" OFF)
+if(UNIX AND NOT APPLE)
+ option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF)
+endif()
+
# Modifiers
option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON)
@@ -811,6 +815,14 @@ if(UNIX AND NOT APPLE)
endif()
endif()
+ if(WITH_SYSTEM_EIGEN3)
+ find_package_wrapper(Eigen3)
+ if(NOT EIGEN3_FOUND)
+ message(FATAL_ERROR "Failed finding system Eigen3 version!")
+ endif()
+ endif()
+ # else values are set below for all platforms
+
if(WITH_PYTHON)
# No way to set py34. remove for now.
# find_package(PythonLibs)
@@ -2246,6 +2258,9 @@ if(WITH_IMAGE_REDCODE)
set(REDCODE_INC ${REDCODE})
endif()
+if(NOT WITH_SYSTEM_EIGEN3)
+ set(EIGEN3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/Eigen3)
+endif()
#-----------------------------------------------------------------------------
# Configure OpenGL.