Skip to content

Commit

Permalink
[build/install] Fix Eigen install path issue. openMVG#1335 (openMVG#1117
Browse files Browse the repository at this point in the history
, openMVG#1118)

Since there is a bug in Eigen cmake file with the usage of
`INCLUDE_INSTALL_DIR` and `EIGEN_INCLUDE_INSTALL_DIR` we force here the
usage of `EIGEN_INCLUDE_INSTALL_DIR`. It avoids the definition of
`${CMAKE_INSTALL_INCLUDEDIR}/eigen3` by default that will go to
`/usr/include` even we use a local specified directory.
  • Loading branch information
pmoulon committed Jun 14, 2018
1 parent 6bf97a2 commit bf29a4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ add_subdirectory(fast)
##
if (DEFINED OpenMVG_USE_INTERNAL_EIGEN)
#Configure Eigen install
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen)
set(EIGEN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen)
add_subdirectory(eigen)
endif()

Expand Down
5 changes: 1 addition & 4 deletions src/third_party/eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})

# Backward compatibility support for EIGEN_INCLUDE_INSTALL_DIR
if(EIGEN_INCLUDE_INSTALL_DIR)
message(WARNING "EIGEN_INCLUDE_INSTALL_DIR is deprecated. Use INCLUDE_INSTALL_DIR instead.")
endif()

if(EIGEN_INCLUDE_INSTALL_DIR AND NOT INCLUDE_INSTALL_DIR)
#message(WARNING "EIGEN_INCLUDE_INSTALL_DIR is deprecated. Use INCLUDE_INSTALL_DIR instead.")
set(INCLUDE_INSTALL_DIR ${EIGEN_INCLUDE_INSTALL_DIR}
CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed")
else()
Expand Down

0 comments on commit bf29a4c

Please sign in to comment.