mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
* in Eigen/CMakeLists.txt, finally do a globbing to we no longer will have problems with "oops forgot to install new module".
* add a file Eigen/signature_of_eigen3_matrix_library, use it to make FindEigen3.cmake more solid: able to find Eigen in either eigen3/ or eigen/ and not mix it up with Eigen2.
This commit is contained in:
parent
b5f4636d42
commit
bbf0eb35a7
@ -1,7 +1,12 @@
|
|||||||
set(Eigen_HEADERS Core LU Cholesky QR Geometry Sparse Array SVD LeastSquares QtAlignedMalloc StdVector Householder Jacobi Eigenvalues)
|
file(GLOB Eigen_directory_files "*")
|
||||||
|
foreach(f ${Eigen_directory_files})
|
||||||
|
if(NOT(f MATCHES ".txt") AND NOT (f MATCHES "src"))
|
||||||
|
list(APPEND Eigen_directory_files_to_install ${f})
|
||||||
|
endif()
|
||||||
|
endforeach(f ${Eigen_directory_files})
|
||||||
|
|
||||||
install(FILES
|
install(FILES
|
||||||
${Eigen_HEADERS}
|
${Eigen_directory_files_to_install}
|
||||||
DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
|
DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
|
||||||
)
|
)
|
||||||
|
|
||||||
|
1
Eigen/signature_of_eigen3_matrix_library
Normal file
1
Eigen/signature_of_eigen3_matrix_library
Normal file
@ -0,0 +1 @@
|
|||||||
|
This file is just there as a signature to help identify directories containing Eigen3. When writing for a script looking for Eigen3, just look for this file. This is especially useful to help disambiguate with Eigen2...
|
@ -60,11 +60,11 @@ if (EIGEN3_INCLUDE_DIR)
|
|||||||
|
|
||||||
else (EIGEN3_INCLUDE_DIR)
|
else (EIGEN3_INCLUDE_DIR)
|
||||||
|
|
||||||
find_path(EIGEN3_INCLUDE_DIR NAMES Eigen/Core
|
find_path(EIGEN3_INCLUDE_DIR NAMES Eigen/signature_of_eigen3_matrix_library
|
||||||
PATHS
|
PATHS
|
||||||
${INCLUDE_INSTALL_DIR}
|
${CMAKE_INSTALL_PREFIX}/include
|
||||||
${KDE4_INCLUDE_DIR}
|
${KDE4_INCLUDE_DIR}
|
||||||
PATH_SUFFIXES eigen3
|
PATH_SUFFIXES eigen3 eigen
|
||||||
)
|
)
|
||||||
|
|
||||||
if(EIGEN3_INCLUDE_DIR)
|
if(EIGEN3_INCLUDE_DIR)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user