KLU depends on BTF but not on libSuiteSparse nor Cholmod

This commit is contained in:
Gael Guennebaud 2017-11-10 13:58:52 +01:00
parent 8cf63ccb99
commit 6365f937d6

View File

@ -16,6 +16,8 @@ find_path(KLU_INCLUDES
ufsparse
)
find_library(KLU_LIBRARIES klu PATHS $ENV{KLUDIR} ${LIB_INSTALL_DIR})
if(KLU_LIBRARIES)
if(NOT KLU_LIBDIR)
@ -32,14 +34,9 @@ if(KLU_LIBRARIES)
set(KLU_LIBRARIES ${KLU_LIBRARIES} ${AMD_LIBRARY})
endif ()
find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS ${KLU_LIBDIR} $ENV{KLUDIR} ${LIB_INSTALL_DIR})
if(SUITESPARSE_LIBRARY)
set(KLU_LIBRARIES ${KLU_LIBRARIES} ${SUITESPARSE_LIBRARY})
endif ()
find_library(CHOLMOD_LIBRARY cholmod PATHS $ENV{KLU_LIBDIR} $ENV{KLUDIR} ${LIB_INSTALL_DIR})
if(CHOLMOD_LIBRARY)
set(KLU_LIBRARIES ${KLU_LIBRARIES} ${CHOLMOD_LIBRARY})
find_library(BTF_LIBRARY btf PATHS $ENV{KLU_LIBDIR} $ENV{KLUDIR} ${LIB_INSTALL_DIR})
if(BTF_LIBRARY)
set(KLU_LIBRARIES ${KLU_LIBRARIES} ${BTF_LIBRARY})
endif()
endif(KLU_LIBRARIES)
@ -48,4 +45,4 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(KLU DEFAULT_MSG
KLU_INCLUDES KLU_LIBRARIES)
mark_as_advanced(KLU_INCLUDES KLU_LIBRARIES AMD_LIBRARY COLAMD_LIBRARY CHOLMOD_LIBRARY SUITESPARSE_LIBRARY)
mark_as_advanced(KLU_INCLUDES KLU_LIBRARIES AMD_LIBRARY COLAMD_LIBRARY BTF_LIBRARY)