# Finding CUBA

# Defines the following variables
# CUBA_INCLUDE_DIRS
# CUBA_LIBRARIES
# CUBA_FOUND

# One should provide the root directory of CUBA through CUBA_ROOT

FIND_PATH(_CUBA_INCLUDE_DIRS
    NAMES cuba.h
    HINTS ${CUBA_ROOT}
    DOC "CUBA include directory.")

SET(_CUBA_LIB_NAME "cuba")
FIND_LIBRARY(_CUBA_LIBRARY
    NAMES ${_CUBA_LIB_NAME}
    HINTS ${CUBA_DIR})

SET(CUBA_INCLUDE_DIRS ${_CUBA_INCLUDE_DIRS})
SET(CUBA_LIBRARIES ${_CUBA_LIBRARY})

INCLUDE(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUBA DEFAULT_MSG CUBA_LIBRARIES CUBA_INCLUDE_DIRS)
MARK_AS_ADVANCED(CUBA_LIBRARIES CUBA_INCLUDE_DIRS)
