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 (SUITESPARSE_LIBRARY) 30 31endif(SPQR_LIBRARIES) 32 33include(FindPackageHandleStandardArgs) 34find_package_handle_standard_args(SPQR DEFAULT_MSG SPQR_INCLUDES SPQR_LIBRARIES) 35 36mark_as_advanced(SPQR_INCLUDES SPQR_LIBRARIES)