File: FindSNDFILE.cmake

package info (click to toggle)
dcmtk 3.6.9-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,648 kB
  • sloc: ansic: 426,874; cpp: 318,177; makefile: 6,401; sh: 4,341; yacc: 1,026; xml: 482; lex: 321; perl: 277
file content (32 lines) | stat: -rw-r--r-- 896 bytes parent folder | download | duplicates (5)
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
32
# Find sndfile library
#
# Released under BSD license
#
#  SNDFILE_INCLUDE_DIRS - where to find sndfile.h, etc
#  SNDFILE_LIBRARIES    - Lists of libraries when using sndfile
#  SNDFILE_FOUND        - True if sndfile found

include(FindPackageHandleStandardArgs)

# Look for the header file
find_path(SNDFILE_INCLUDE_DIR NAMES sndfile.h)
mark_as_advanced(SNDFILE_INCLUDE_DIR)

# Look for the library
set(SNDFILE_LIBS sndfile)
find_library(SNDFILE_LIBRARY NAMES ${SNDFILE_LIBS})
mark_as_advanced(SNDFILE_LIBRARY)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SNDFILE REQUIRED_VARS SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)

# Copy the result to output variables
if(SNDFILE_FOUND)
  set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
  set(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
else()
  set(SNDFILE_LIBS)
  set(SNDFILE_LIBRARY)
  set(SNDFILE_LIBRARIES)
  set(SNDFILE_INCLUDE_DIR)
  set(SNDFILE_INCLUDE_DIRS)
endif()