INCLUDE(FindPackageHandleStandardArgs)

IF (NOT MAD_INCLUDE_DIR)
    FIND_PATH(MAD_INCLUDE_DIR mad.h HINTS $ENV{MAD_DIR})
ENDIF()

IF (NOT MAD_LIBRARIES)
    FIND_LIBRARY(MAD_LIBRARIES mad HINTS $ENV{MAD_DIR})
ENDIF()

MARK_AS_ADVANCED(MAD_INCLUDE_DIR)
MARK_AS_ADVANCED(MAD_LIBRARIES)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(
    Mad
    DEFAULT_MSG
    MAD_LIBRARIES
    MAD_INCLUDE_DIR
)

