source: pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/eigen/cmake/FindSPQR.cmake

Last change on this file was 136, checked in by ldecherf, 8 years ago

Doc

File size: 1.2 KB
Line 
1# SPQR lib usually requires linking to a blas and lapack library.
2# It is up to the user of this module to find a BLAS and link to it.
3
4# SPQR lib requires Cholmod, colamd and amd as well.
5# FindCholmod.cmake can be used to find those packages before finding spqr
6
7if (SPQR_INCLUDES AND SPQR_LIBRARIES)
8 set(SPQR_FIND_QUIETLY TRUE)
9endif (SPQR_INCLUDES AND SPQR_LIBRARIES)
10
11find_path(SPQR_INCLUDES
12 NAMES
13 SuiteSparseQR.hpp
14 PATHS
15 $ENV{SPQRDIR}
16 ${INCLUDE_INSTALL_DIR}
17 PATH_SUFFIXES
18 suitesparse
19 ufsparse
20)
21
22find_library(SPQR_LIBRARIES spqr $ENV{SPQRDIR} ${LIB_INSTALL_DIR})
23
24if(SPQR_LIBRARIES)
25
26 find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS $ENV{SPQRDIR} ${LIB_INSTALL_DIR})
27 if (SUITESPARSE_LIBRARY)
28 set(SPQR_LIBRARIES ${SPQR_LIBRARIES} ${SUITESPARSE_LIBRARY})
29 endif()
30
31 find_library(CHOLMOD_LIBRARY cholmod PATHS $ENV{UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
32 if(CHOLMOD_LIBRARY)
33 set(SPQR_LIBRARIES ${SPQR_LIBRARIES} ${CHOLMOD_LIBRARY})
34 endif()
35
36endif(SPQR_LIBRARIES)
37
38include(FindPackageHandleStandardArgs)
39find_package_handle_standard_args(SPQR DEFAULT_MSG SPQR_INCLUDES SPQR_LIBRARIES)
40
41mark_as_advanced(SPQR_INCLUDES SPQR_LIBRARIES)
Note: See TracBrowser for help on using the repository browser.