1
# MAD_INCLUDE_DIRS - where to find mad.h, etc.
2
# MAD_LIBRARIES - List of libraries when using libmad.
3
# MAD_FOUND - True if libmad found.
5
# Look for the header file.
6
FIND_PATH(MAD_INCLUDE_DIR NAMES mad.h)
7
MARK_AS_ADVANCED(MAD_INCLUDE_DIR)
9
# Look for the library.
10
FIND_LIBRARY(MAD_LIBRARY NAMES mad)
11
MARK_AS_ADVANCED(MAD_LIBRARY)
13
# Copy the results to the output variables.
14
IF(MAD_INCLUDE_DIR AND MAD_LIBRARY)
16
SET(MAD_LIBRARIES ${MAD_LIBRARY})
17
SET(MAD_INCLUDE_DIRS ${MAD_INCLUDE_DIR})
18
ELSE(MAD_INCLUDE_DIR AND MAD_LIBRARY)
22
ENDIF(MAD_INCLUDE_DIR AND MAD_LIBRARY)
27
"libmad was not found. Make sure MAD_LIBRARY and MAD_INCLUDE_DIR are set.")
28
IF(NOT MAD_FIND_QUIETLY)
29
MESSAGE(STATUS "${MAD_DIR_MESSAGE}")
30
ELSE(NOT MAD_FIND_QUIETLY)
32
MESSAGE(FATAL_ERROR "${MAD_DIR_MESSAGE}")
33
ENDIF(MAD_FIND_REQUIRED)
34
ENDIF(NOT MAD_FIND_QUIETLY)