## Anyway, it chould be work also on linux (tested on fedora 17 when you installed suitesparse from yum)
##
##
## Inputs variables this file can process (variable must be given before find_package(SUITESPARES ...) command) :
## * SuiteSparse_VERBOSE Default to OFF
## * SuiteSparse_USE_LAPACK_BLAS Default to OFF. If ON append to SuiteSparse_LIBRARIES the blas and lapack library
## Note: SuiteSparse lib usually requires linking to a blas and lapack library.
##
##
## Help variables this file handle internaly :
## * SuiteSparse_SEARCH_LIB_POSTFIX Is set in cache (as advanced) to look into the right lib/lib64 dir for libraries (user can change)
##
##
## Variables this file provide :
## * SuiteSparse_FOUND True if SuiteSparse given COMPONENTS include and libraries were found
## * SuiteSparse_INCLUDE_DIRS Paths containing SuiteSparse needed headers (depend on which COMPONENTS you gave)
## * SuiteSparse_LIBRARIES Absolute paths of SuiteSparse libs found (depend on which COMPONENTS you gave)
## If SuiteSparse_USE_LAPACK_BLAS is set to ON :
## * SuiteSparse_LAPACK_BLAS_LIBRARIES Which contain the libblas and liblapack libraries
## On windows:
## * SuiteSparse_LAPACK_BLAS_DLL Which contain all requiered binaries for use libblas and liblapack
##
##
## Detailed variables this file provide :
## * SuiteSparse_<UPPPER_CASE_COMPONENT>_FOUND True if the given component to look for is found (INCLUDE DIR and LIBRARY)
## * SuiteSparse_<UPPPER_CASE_COMPONENT>_INCLUDE_DIR The path directory where we can found all compenent header files
## * SuiteSparse_<UPPPER_CASE_COMPONENT>_LIBRARY The file path to the component library
## Note: If a component is not found, a SuiteSparse_<UPPPER_CASE_COMPONENT>_DIR cache variable is set to allow user set the search directory.
##
##
## Possible componnents to find are (maybe some others can be available):
## * AMD
## * CAMD
## * COLAMD
## * CCOLAMD
## * CHOLMOD : this lib need all previous one. According to how it was build (a single static lib or a full dynamic one), you should looking for its dependencies.
## * metis (opt): may not be found (depend if suitesparse was build with metis or not) => required by CHOLMOD (optional)
##
##
## How to use this file :
## (opt) set(SuiteSparse_VERBOSE ON)
## (opt) set(SuiteSparse_USE_LAPACK_BLAS ON)
## ( 1 ) find_package(SuiteSparse) ## metis is not search by default because it's not a part of suitesparse (suitesparse can be built without metis)
## ( 2 ) find_package(SuiteSparse COMPONENTS metis CHOLMOD) ## be careful, components are case sensitive
## ( 3 ) find_package(SuiteSparse COMPONENTS metis suitesparse) ## valid on windows (linux have no suitesparse library)
message(WARNING " Failed to find ${suitesparseComp} :\nSuiteSparse_${suitesparseCompUC}_INCLUDE_DIR not found.\nCheck you write correctly the component name (case sensitive),\nor set the SuiteSparse_${suitesparseCompUC}_DIR to look inside")
## here we allow to find at least the include OR the lib dir and just warn if one of both missing
if(NOT SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR AND NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE)
set(SuiteSparse_${suitesparseCompUC}_FOUND OFF)
else()
set(SuiteSparse_${suitesparseCompUC}_FOUND ON)
endif()
## if one of both (include dir or filepath lib), then we provide a new cmake cache variable for the search. Otherwise we don't need anymore to expose all intermediates variables