SET(OPEN_BLAS_SEARCH_PATHS
  /usr
  /usr/local
  ${OPENBLAS_DIR}
)
FIND_LIBRARY(OPENBLAS_LIBS
  NAMES openblas
  PATHS ${OPEN_BLAS_SEARCH_PATHS}
  PATH_SUFFIXES lib lib64
)
FIND_PATH(OPENBLAS_INC
  NAMES cblas.h
  PATHS ${OPEN_BLAS_SEARCH_PATHS}
  PATH_SUFFIXES include
)

IF (OPENBLAS_LIBS AND OPENBLAS_INC)
  SET(OPENBLAS_FOUND ON)
ENDIF ()

IF (OPENBLAS_FOUND)
#  IF (NOT NATIVE_BLAS_LAPACK_FIND_QUIETLY)
  SET(OPENBLAS_INCLUDE )
  MESSAGE(STATUS "Found OpenBLAS")
#  ENDIF (NOT NATIVE_BLAS_LAPACK_FIND_QUIETLY)
ELSE(OPENBLAS_FOUND)
#  IF (NATIVE_BLAS_LAPACK_FIND_REQUIRED)
  MESSAGE(FATAL_ERROR "Could not find OpenBLAS libraries.")
#  ENDIF (NATIVE_BLAS_LAPACK_FIND_REQUIRED)
ENDIF ()

MARK_AS_ADVANCED(OPENBLAS_LIBS OPENBLAS_INC)

