~ubuntu-branches/ubuntu/wily/pianobar/wily-proposed

« back to all changes in this revision

Viewing changes to src/FindMad.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Luke Faraone
  • Date: 2010-10-07 09:15:49 UTC
  • mfrom: (1.3.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101007091549-sscxdr1kud0d4hyl
Tags: 2010.10.07-1
* New upstream version. 
  - XMLRPC api version bump (v28) (closes: #599338)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
4
 
 
5
 
# Look for the header file.
6
 
FIND_PATH(MAD_INCLUDE_DIR NAMES mad.h)
7
 
MARK_AS_ADVANCED(MAD_INCLUDE_DIR)
8
 
 
9
 
# Look for the library.
10
 
FIND_LIBRARY(MAD_LIBRARY NAMES mad)
11
 
MARK_AS_ADVANCED(MAD_LIBRARY)
12
 
 
13
 
# Copy the results to the output variables.
14
 
IF(MAD_INCLUDE_DIR AND MAD_LIBRARY)
15
 
  SET(MAD_FOUND 1)
16
 
  SET(MAD_LIBRARIES ${MAD_LIBRARY})
17
 
  SET(MAD_INCLUDE_DIRS ${MAD_INCLUDE_DIR})
18
 
ELSE(MAD_INCLUDE_DIR AND MAD_LIBRARY)
19
 
  SET(MAD_FOUND 0)
20
 
  SET(MAD_LIBRARIES)
21
 
  SET(MAD_INCLUDE_DIRS)
22
 
ENDIF(MAD_INCLUDE_DIR AND MAD_LIBRARY)
23
 
 
24
 
# Report the results.
25
 
IF(NOT MAD_FOUND)
26
 
  SET(MAD_DIR_MESSAGE
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)
31
 
    IF(MAD_FIND_REQUIRED)
32
 
      MESSAGE(FATAL_ERROR "${MAD_DIR_MESSAGE}")
33
 
    ENDIF(MAD_FIND_REQUIRED)
34
 
  ENDIF(NOT MAD_FIND_QUIETLY)
35
 
ENDIF(NOT MAD_FOUND)