find_path(CXSPARSE_INCLUDE_DIR NAMES "cs.h" PATHS ${CONAN_INCLUDE_DIRS_CXSPARSE} PATH_SUFFIXES CXSparse)
message(STATUS "Look for ${CONAN_LIBS_CXSPARSE} in ${CONAN_LIB_DIRS_CXSPARSE}")
find_library(CXSPARSE_LIBRARY NAMES ${CONAN_LIBS_CXSPARSE} PATHS ${CONAN_LIB_DIRS_CXSPARSE})

message("** CXSparse already found by conan!")
SET(CXSPARSE_FOUND TRUE)
message(STATUS "** Found CXSparse:  ${CXSPARSE_LIBRARY}")
message(STATUS "** Found CXSparse include:  ${CXSPARSE_INCLUDE_DIR}")

set(CXSPARSE_INCLUDE_DIRS ${CXSPARSE_INCLUDE_DIR})
set(CXSPARSE_LIBRARIES ${CXSPARSE_LIBRARY})

mark_as_advanced(CXSPARSE_LIBRARY CXSPARSE_INCLUDE_DIR)
