diff --git a/CMakeLists.txt b/CMakeLists.txt index 23ad2d6a46..feeaa9a847 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -656,11 +656,13 @@ if (CAN_USE_EIGEN) OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/eigen") else() OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN") + OCCT_CHECK_AND_UNSET ("INSTALL_EIGEN") endif() else() OCCT_CHECK_AND_UNSET ("USE_EIGEN") OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN") + OCCT_CHECK_AND_UNSET ("INSTALL_EIGEN") endif() # Doxygen diff --git a/adm/cmake/eigen.cmake b/adm/cmake/eigen.cmake index d0ae133c65..87b56ea464 100644 --- a/adm/cmake/eigen.cmake +++ b/adm/cmake/eigen.cmake @@ -1,5 +1,9 @@ # eigen +if (NOT DEFINED INSTALL_EIGEN) + set (INSTALL_EIGEN OFF CACHE BOOL "${INSTALL_EIGEN_DESCR}") +endif() + # eigen directory if (NOT DEFINED 3RDPARTY_EIGEN_DIR) set (3RDPARTY_EIGEN_DIR "" CACHE PATH "The directory containing eigen") @@ -61,6 +65,18 @@ endif() if (3RDPARTY_EIGEN_INCLUDE_DIR AND EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}") list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}") + + # Install header files + if (INSTALL_EIGEN) + file(GLOB EIGEN_SUBDIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}/*") + foreach(SUBDIR ${EIGEN_SUBDIRS}) + if(IS_DIRECTORY "${SUBDIR}") + install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}") + else() + install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}") + endif() + endforeach() + endif() else() list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_EIGEN_INCLUDE_DIR) diff --git a/adm/cmake/vardescr.cmake b/adm/cmake/vardescr.cmake index 6fb03952ca..c2327622a5 100644 --- a/adm/cmake/vardescr.cmake +++ b/adm/cmake/vardescr.cmake @@ -84,6 +84,7 @@ INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts") INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)") INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries") INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries") +INSTALL_MESSAGE (INSTALL_EIGEN "EIGEN header files") INSTALL_MESSAGE (INSTALL_EGL "EGL binaries") INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries") INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")