IF (NOT SUPERLU_ROOT)
  SET(SUPERLU_ROOT $ENV{SUPERLU_ROOT})
ENDIF()
IF (SUPERLU_LIBRARIES)
  #we were given the exact list of libraries to find
  KOKKOSKERNELS_FIND_IMPORTED(SUPERLU INTERFACE
    LIBRARIES ${SUPERLU_LIBRARIES}
    LIBRARY_PATHS ${SUPERLU_LIBRARY_DIRS}
    HEADERS slu_ddefs.h
    HEADER_PATHS ${SUPERLU_INCLUDE_DIRS})
ELSE()
  #we need to find one of the valid versions from the list below
  KOKKOSKERNELS_FIND_IMPORTED(SUPERLU
    LIBRARY superlu
    LIBRARY_PATHS ${SUPERLU_LIBRARY_DIRS}
    HEADERS slu_ddefs.h
    HEADER_PATHS ${SUPERLU_INCLUDE_DIRS})
ENDIF()
