1 # Umfpack lib usually requires linking to a blas library. 2 # It is up to the user of this module to find a BLAS and link to it. 8 find_path(UMFPACK_INCLUDE_DIR
12 ${UMFPACK_DIR}/include
13 $ENV{UMFPACKDIR}/include
14 ${INCLUDE_INSTALL_DIR}
20 find_library(UMFPACK_LIBRARIES
28 if (UMFPACK_LIBRARIES)
30 if (NOT UMFPACK_LIBDIR)
32 endif(NOT UMFPACK_LIBDIR)
34 find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR}/lib ${LIB_INSTALL_DIR})
36 set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})
37 endif (COLAMD_LIBRARY)
39 find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR}/lib ${LIB_INSTALL_DIR})
41 set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY})
44 find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR}/lib ${LIB_INSTALL_DIR})
45 if (SUITESPARSE_LIBRARY)
46 set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${SUITESPARSE_LIBRARY})
47 endif (SUITESPARSE_LIBRARY)
51 include(FindPackageHandleStandardArgs)
52 find_package_handle_standard_args(UMFPACK DEFAULT_MSG
53 UMFPACK_INCLUDE_DIR UMFPACK_LIBRARIES)
56 string (REGEX REPLACE
"/(suitesparse|ufsparse)/?" "" UMFPACK_DIR
"${UMFPACK_INCLUDE_DIR}")
60 mark_as_advanced(UMFPACK_INCLUDE_DIR UMFPACK_LIBRARIES AMD_LIBRARY COLAMD_LIBRARY SUITESPARSE_LIBRARY)
cmake UMFPACK_FIND_QUIETLY
function get_filename_component(inout ARGN)
Fixes CMake's get_filename_component() command.