CMake: unbundle eigen3
Optionally use systems eigen3 library. T41989 by @hasufell with edits
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user