Add missing linear resampler to the option setting list
[openal-soft.git] / cmake / FindOpenSL.cmake
blobe4b260bc8eb8a119f2998957be50f4986488bad1
1 # - Find OpenSL
2 # Find the OpenSL libraries
4 #  This module defines the following variables:
5 #     OPENSL_FOUND        - True if OPENSL_INCLUDE_DIR & OPENSL_LIBRARY are set
6 #     OPENSL_INCLUDE_DIRS - where to find SLES/OpenSLES.h, etc.
7 #     OPENSL_LIBRARIES    - the OpenSL library
10 #=============================================================================
11 # Copyright 2009-2011 Kitware, Inc.
12 # Copyright 2009-2011 Philip Lowman <philip@yhbt.com>
14 # Redistribution and use in source and binary forms, with or without
15 # modification, are permitted provided that the following conditions are
16 # met:
18 #  * Redistributions of source code must retain the above copyright notice,
19 #    this list of conditions and the following disclaimer.
21 #  * Redistributions in binary form must reproduce the above copyright notice,
22 #    this list of conditions and the following disclaimer in the documentation
23 #    and/or other materials provided with the distribution.
25 #  * The names of Kitware, Inc., the Insight Consortium, or the names of
26 #    any consortium members, or of any contributors, may not be used to
27 #    endorse or promote products derived from this software without
28 #    specific prior written permission.
30 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
31 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
34 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
38 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 #=============================================================================
42 find_path(OPENSL_INCLUDE_DIR NAMES SLES/OpenSLES.h
43           DOC "The OpenSL include directory"
45 find_path(OPENSL_ANDROID_INCLUDE_DIR NAMES SLES/OpenSLES_Android.h
46           DOC "The OpenSL Android include directory"
49 find_library(OPENSL_LIBRARY NAMES OpenSLES
50              DOC "The OpenSL library"
53 # handle the QUIETLY and REQUIRED arguments and set OPENSL_FOUND to TRUE if
54 # all listed variables are TRUE
55 include(FindPackageHandleStandardArgs)
56 find_package_handle_standard_args(OpenSL REQUIRED_VARS OPENSL_LIBRARY OPENSL_INCLUDE_DIR
57     OPENSL_ANDROID_INCLUDE_DIR)
59 if(OPENSL_FOUND)
60     set(OPENSL_LIBRARIES ${OPENSL_LIBRARY})
61     set(OPENSL_INCLUDE_DIRS ${OPENSL_INCLUDE_DIR} ${OPENSL_ANDROID_INCLUDE_DIR})
62 endif()
64 mark_as_advanced(OPENSL_INCLUDE_DIR OPENSL_ANDROID_INCLUDE_DIR OPENSL_LIBRARY)