mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-10-11 15:41:30 +08:00
Restore EIGEN_INCLUDE_DIR in CMake again (for 3.4.x)
This commit is contained in:
parent
eb57d4bdf1
commit
cd7263e7f6
@ -175,6 +175,9 @@ set ( EIGEN_VERSION_STRING ${EIGEN_VERSION_NUMBER} )
|
|||||||
set ( EIGEN_VERSION_MAJOR ${EIGEN_WORLD_VERSION} )
|
set ( EIGEN_VERSION_MAJOR ${EIGEN_WORLD_VERSION} )
|
||||||
set ( EIGEN_VERSION_MINOR ${EIGEN_MAJOR_VERSION} )
|
set ( EIGEN_VERSION_MINOR ${EIGEN_MAJOR_VERSION} )
|
||||||
set ( EIGEN_VERSION_PATCH ${EIGEN_MINOR_VERSION} )
|
set ( EIGEN_VERSION_PATCH ${EIGEN_MINOR_VERSION} )
|
||||||
|
set ( EIGEN_DEFINITIONS "")
|
||||||
|
set ( EIGEN_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}" )
|
||||||
|
set ( EIGEN_ROOT_DIR ${CMAKE_INSTALL_PREFIX} )
|
||||||
|
|
||||||
# Alias Eigen_*_DIR to Eigen3_*_DIR:
|
# Alias Eigen_*_DIR to Eigen3_*_DIR:
|
||||||
set(Eigen_SOURCE_DIR ${Eigen3_SOURCE_DIR})
|
set(Eigen_SOURCE_DIR ${Eigen3_SOURCE_DIR})
|
||||||
@ -215,6 +218,7 @@ if(EIGEN_BUILD_CMAKE_PACKAGE)
|
|||||||
configure_package_config_file (
|
configure_package_config_file (
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
||||||
|
PATH_VARS EIGEN_INCLUDE_DIR EIGEN_ROOT_DIR
|
||||||
INSTALL_DESTINATION ${CMAKEPACKAGE_INSTALL_DIR}
|
INSTALL_DESTINATION ${CMAKEPACKAGE_INSTALL_DIR}
|
||||||
NO_SET_AND_CHECK_MACRO # Eigen does not provide legacy style defines
|
NO_SET_AND_CHECK_MACRO # Eigen does not provide legacy style defines
|
||||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO # Eigen does not provide components
|
NO_CHECK_REQUIRED_COMPONENTS_MACRO # Eigen does not provide components
|
||||||
@ -249,7 +253,8 @@ if(EIGEN_BUILD_CMAKE_PACKAGE)
|
|||||||
|
|
||||||
install (EXPORT Eigen3Targets NAMESPACE Eigen3:: DESTINATION ${CMAKEPACKAGE_INSTALL_DIR})
|
install (EXPORT Eigen3Targets NAMESPACE Eigen3:: DESTINATION ${CMAKEPACKAGE_INSTALL_DIR})
|
||||||
|
|
||||||
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/UseEigen3.cmake
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/Eigen3ConfigVersion.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/Eigen3ConfigVersion.cmake
|
||||||
DESTINATION ${CMAKEPACKAGE_INSTALL_DIR})
|
DESTINATION ${CMAKEPACKAGE_INSTALL_DIR})
|
||||||
|
|
||||||
|
@ -1,6 +1,20 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
#
|
#
|
||||||
# UseEigen3.cmake
|
# UseEigen3.cmake
|
||||||
|
#
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# This file provides legacy support for including Eigen in CMake.
|
||||||
|
# The modern and preferred way is to use:
|
||||||
|
#
|
||||||
|
# find_package (Eigen3 3.4 REQUIRED NO_MODULE)
|
||||||
|
# add_executable (example example.cpp)
|
||||||
|
# target_link_libraries (example Eigen3::Eigen)
|
||||||
|
#
|
||||||
|
# Use the commands below only if you must maintain compatibility
|
||||||
|
# with older CMake/Eigen projects.
|
||||||
|
# For more information:
|
||||||
|
# https://libeigen.gitlab.io/eigen/docs-3.4/TopicCMakeGuide.html
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
add_definitions ( ${EIGEN3_DEFINITIONS} )
|
add_definitions ( ${EIGEN3_DEFINITIONS} )
|
||||||
include_directories ( ${EIGEN3_INCLUDE_DIRS} )
|
include_directories ( ${EIGEN3_INCLUDE_DIRS} )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user