diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
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. |