2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# - Find SndFile library
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Find the native SndFile includes and library
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# This module defines
							 | 
						
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#  LIBSNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#                        LIBSNDFILE_INCLUDE_DIR is found.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#                    This can also be an environment variable.
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-19 09:14:15 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#  SNDFILE_FOUND, If false, do not try to use SndFile.
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# also defined, but not for general use are
							 | 
						
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#  LIBSNDFILE_LIBRARY, where to find the SndFile library.
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#=============================================================================
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-20 02:54:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Copyright 2011 Blender Foundation.
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-12 18:31:06 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Distributed under the OSI-approved BSD 3-Clause License,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# see accompanying file BSD-3-Clause-license.txt for details.
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#=============================================================================
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# If LIBSNDFILE_ROOT_DIR was defined in the environment, use it.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								IF(NOT LIBSNDFILE_ROOT_DIR AND NOT $ENV{LIBSNDFILE_ROOT_DIR} STREQUAL "")
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  SET(LIBSNDFILE_ROOT_DIR $ENV{LIBSNDFILE_ROOT_DIR})
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ENDIF()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								SET(_sndfile_SEARCH_DIRS
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ${LIBSNDFILE_ROOT_DIR}
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  HINTS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    ${_sndfile_SEARCH_DIRS}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  PATH_SUFFIXES
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    include
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FIND_LIBRARY(LIBSNDFILE_LIBRARY
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-20 02:54:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  NAMES
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    sndfile
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  HINTS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    ${_sndfile_SEARCH_DIRS}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  PATH_SUFFIXES
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    lib64 lib
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  )
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-19 09:14:15 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# all listed variables are TRUE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								INCLUDE(FindPackageHandleStandardArgs)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-19 09:14:15 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								IF(SNDFILE_FOUND)
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
							 | 
						
					
						
							
								
									
										
										
										
											2020-10-05 16:02:32 +11:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ENDIF()
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-18 12:12:19 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-19 07:46:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								MARK_AS_ADVANCED(
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  LIBSNDFILE_INCLUDE_DIR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  LIBSNDFILE_LIBRARY
							 | 
						
					
						
							
								
									
										
										
										
											2011-06-19 07:46:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								)
							 |