File: FindFLAC.cmake

package info (click to toggle)
composite 0.006.2%2Bdfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 12,244 kB
  • sloc: cpp: 39,829; xml: 1,370; python: 320; ansic: 219; makefile: 150; php: 73; sh: 52
file content (31 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# FindFLAC
# Try to find libFLAC
#
# Once found, will define:
#
#    FLAC_FOUND
#    FLAC_INCLUDE_DIRS
#    FLAC_LIBRARIES
#

INCLUDE(TritiumPackageHelper)

TPH_FIND_PACKAGE(FLAC flac FLAC/stream_encoder.h FLAC)

### FLAC erroneously ships with flac.pc, and it reports the
### include directory as /usr/include/FLAC.  This usually
### shows up when /usr/include/FLAC/assert.h causes compiler
### probleams.
SET(_FLAC_NEW_LIST "")
FOREACH(J ${FLAC_INCLUDE_DIRS})
  STRING(REGEX REPLACE "/FLAC(\\+\\+)?" "" Z ${J})
  SET(_FLAC_NEW_LIST ${_FLAC_NEW_LIST} ${Z})
ENDFOREACH(J ${FLAC_INCLUDE_DIRS})
SET(FLAC_INCLUDE_DIRS ${_FLAC_NEW_LIST})

INCLUDE(TritiumFindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLAC DEFAULT_MSG FLAC_LIBRARIES FLAC_INCLUDE_DIRS)

MARK_AS_ADVANCED(FLAC_INCLUDE_DIRS FLAC_LIBRARIES)