forked from DCMTK/dcmtk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindSNDFILE.cmake
32 lines (27 loc) · 896 Bytes
/
FindSNDFILE.cmake
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()