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.
4 # SPQR lib requires Cholmod, colamd and amd as well.
5 # FindCholmod.cmake can be used to find those packages before finding spqr
7 if (SPQR_INCLUDES AND SPQR_LIBRARIES)
8 set(SPQR_FIND_QUIETLY TRUE)
9 endif (SPQR_INCLUDES AND SPQR_LIBRARIES)
11 find_path(SPQR_INCLUDES
16 ${INCLUDE_INSTALL_DIR}
22 find_library(SPQR_LIBRARIES spqr $ENV{SPQRDIR} ${LIB_INSTALL_DIR})
26 find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS $ENV{SPQRDIR} ${LIB_INSTALL_DIR})
27 if (SUITESPARSE_LIBRARY)
28 set(SPQR_LIBRARIES ${SPQR_LIBRARIES} ${SUITESPARSE_LIBRARY})
31 find_library(CHOLMOD_LIBRARY cholmod PATHS $ENV{UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
33 set(SPQR_LIBRARIES ${SPQR_LIBRARIES} ${CHOLMOD_LIBRARY})
38 include(FindPackageHandleStandardArgs)
39 find_package_handle_standard_args(SPQR DEFAULT_MSG SPQR_INCLUDES SPQR_LIBRARIES)
41 mark_as_advanced(SPQR_INCLUDES SPQR_LIBRARIES)