First Commit
This commit is contained in:
73
externals/openal-soft/cmake/FindALSA.cmake
vendored
Normal file
73
externals/openal-soft/cmake/FindALSA.cmake
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
# - Find alsa
|
||||
# Find the alsa libraries (asound)
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# ALSA_FOUND - True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found
|
||||
# ALSA_LIBRARIES - Set when ALSA_LIBRARY is found
|
||||
# ALSA_INCLUDE_DIRS - Set when ALSA_INCLUDE_DIR is found
|
||||
#
|
||||
# ALSA_INCLUDE_DIR - where to find asoundlib.h, etc.
|
||||
# ALSA_LIBRARY - the asound library
|
||||
# ALSA_VERSION_STRING - the version of alsa found (since CMake 2.8.8)
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009-2011 Kitware, Inc.
|
||||
# Copyright 2009-2011 Philip Lowman <philip@yhbt.com>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# * The names of Kitware, Inc., the Insight Consortium, or the names of
|
||||
# any consortium members, or of any contributors, may not be used to
|
||||
# endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h
|
||||
DOC "The ALSA (asound) include directory"
|
||||
)
|
||||
|
||||
find_library(ALSA_LIBRARY NAMES asound
|
||||
DOC "The ALSA (asound) library"
|
||||
)
|
||||
|
||||
if(ALSA_INCLUDE_DIR AND EXISTS "${ALSA_INCLUDE_DIR}/alsa/version.h")
|
||||
file(STRINGS "${ALSA_INCLUDE_DIR}/alsa/version.h" alsa_version_str REGEX "^#define[\t ]+SND_LIB_VERSION_STR[\t ]+\".*\"")
|
||||
|
||||
string(REGEX REPLACE "^.*SND_LIB_VERSION_STR[\t ]+\"([^\"]*)\".*$" "\\1" ALSA_VERSION_STRING "${alsa_version_str}")
|
||||
unset(alsa_version_str)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ALSA
|
||||
REQUIRED_VARS ALSA_LIBRARY ALSA_INCLUDE_DIR
|
||||
VERSION_VAR ALSA_VERSION_STRING)
|
||||
|
||||
if(ALSA_FOUND)
|
||||
set( ALSA_LIBRARIES ${ALSA_LIBRARY} )
|
||||
set( ALSA_INCLUDE_DIRS ${ALSA_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(ALSA_INCLUDE_DIR ALSA_LIBRARY)
|
||||
21
externals/openal-soft/cmake/FindAudioIO.cmake
vendored
Normal file
21
externals/openal-soft/cmake/FindAudioIO.cmake
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# - Find AudioIO includes and libraries
|
||||
#
|
||||
# AUDIOIO_FOUND - True if AUDIOIO_INCLUDE_DIR is found
|
||||
# AUDIOIO_INCLUDE_DIRS - Set when AUDIOIO_INCLUDE_DIR is found
|
||||
#
|
||||
# AUDIOIO_INCLUDE_DIR - where to find sys/audioio.h, etc.
|
||||
#
|
||||
|
||||
find_path(AUDIOIO_INCLUDE_DIR
|
||||
NAMES sys/audioio.h
|
||||
DOC "The AudioIO include directory"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(AudioIO REQUIRED_VARS AUDIOIO_INCLUDE_DIR)
|
||||
|
||||
if(AUDIOIO_FOUND)
|
||||
set(AUDIOIO_INCLUDE_DIRS ${AUDIOIO_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(AUDIOIO_INCLUDE_DIR)
|
||||
157
externals/openal-soft/cmake/FindFFmpeg.cmake
vendored
Normal file
157
externals/openal-soft/cmake/FindFFmpeg.cmake
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
# vim: ts=2 sw=2
|
||||
# - Try to find the required ffmpeg components(default: AVFORMAT, AVUTIL, AVCODEC)
|
||||
#
|
||||
# Once done this will define
|
||||
# FFMPEG_FOUND - System has the all required components.
|
||||
# FFMPEG_INCLUDE_DIRS - Include directory necessary for using the required components headers.
|
||||
# FFMPEG_LIBRARIES - Link these to use the required ffmpeg components.
|
||||
# FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components.
|
||||
#
|
||||
# For each of the components it will additionaly set.
|
||||
# - AVCODEC
|
||||
# - AVDEVICE
|
||||
# - AVFORMAT
|
||||
# - AVUTIL
|
||||
# - POSTPROC
|
||||
# - SWSCALE
|
||||
# - SWRESAMPLE
|
||||
# the following variables will be defined
|
||||
# <component>_FOUND - System has <component>
|
||||
# <component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers
|
||||
# <component>_LIBRARIES - Link these to use <component>
|
||||
# <component>_DEFINITIONS - Compiler switches required for using <component>
|
||||
# <component>_VERSION - The components version
|
||||
#
|
||||
# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org>
|
||||
# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2011, Michael Jansen, <kde@michael-jansen.biz>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(NOT FFmpeg_FIND_COMPONENTS)
|
||||
set(FFmpeg_FIND_COMPONENTS AVFORMAT AVCODEC AVUTIL)
|
||||
endif()
|
||||
|
||||
#
|
||||
### Macro: set_component_found
|
||||
#
|
||||
# Marks the given component as found if both *_LIBRARIES AND *_INCLUDE_DIRS is present.
|
||||
#
|
||||
macro(set_component_found _component)
|
||||
if(${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS)
|
||||
# message(STATUS " - ${_component} found.")
|
||||
set(${_component}_FOUND TRUE)
|
||||
else()
|
||||
# message(STATUS " - ${_component} not found.")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#
|
||||
### Macro: find_component
|
||||
#
|
||||
# Checks for the given component by invoking pkgconfig and then looking up the libraries and
|
||||
# include directories.
|
||||
#
|
||||
macro(find_component _component _pkgconfig _library _header)
|
||||
if(NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_${_component} ${_pkgconfig})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_path(${_component}_INCLUDE_DIRS ${_header}
|
||||
HINTS
|
||||
${FFMPEGSDK_INC}
|
||||
${PC_LIB${_component}_INCLUDEDIR}
|
||||
${PC_LIB${_component}_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES
|
||||
ffmpeg
|
||||
)
|
||||
|
||||
find_library(${_component}_LIBRARIES NAMES ${_library}
|
||||
HINTS
|
||||
${FFMPEGSDK_LIB}
|
||||
${PC_LIB${_component}_LIBDIR}
|
||||
${PC_LIB${_component}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number." FORCE)
|
||||
set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS." FORCE)
|
||||
|
||||
set_component_found(${_component})
|
||||
|
||||
mark_as_advanced(
|
||||
${_component}_INCLUDE_DIRS
|
||||
${_component}_LIBRARIES
|
||||
${_component}_DEFINITIONS
|
||||
${_component}_VERSION)
|
||||
endmacro()
|
||||
|
||||
|
||||
set(FFMPEGSDK $ENV{FFMPEG_HOME})
|
||||
if(FFMPEGSDK)
|
||||
set(FFMPEGSDK_INC "${FFMPEGSDK}/include")
|
||||
set(FFMPEGSDK_LIB "${FFMPEGSDK}/lib")
|
||||
endif()
|
||||
|
||||
# Check for all possible components.
|
||||
find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h)
|
||||
find_component(AVFORMAT libavformat avformat libavformat/avformat.h)
|
||||
find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
|
||||
find_component(AVUTIL libavutil avutil libavutil/avutil.h)
|
||||
find_component(SWSCALE libswscale swscale libswscale/swscale.h)
|
||||
find_component(SWRESAMPLE libswresample swresample libswresample/swresample.h)
|
||||
find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h)
|
||||
|
||||
# Check if the required components were found and add their stuff to the FFMPEG_* vars.
|
||||
foreach(_component ${FFmpeg_FIND_COMPONENTS})
|
||||
if(${_component}_FOUND)
|
||||
# message(STATUS "Required component ${_component} present.")
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES})
|
||||
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
|
||||
list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
|
||||
else()
|
||||
# message(STATUS "Required component ${_component} missing.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Add libz if it exists (needed for static ffmpeg builds)
|
||||
find_library(_FFmpeg_HAVE_LIBZ NAMES z)
|
||||
if(_FFmpeg_HAVE_LIBZ)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${_FFmpeg_HAVE_LIBZ})
|
||||
endif()
|
||||
|
||||
# Build the include path and library list with duplicates removed.
|
||||
if(FFMPEG_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
|
||||
endif()
|
||||
|
||||
if(FFMPEG_LIBRARIES)
|
||||
list(REMOVE_DUPLICATES FFMPEG_LIBRARIES)
|
||||
endif()
|
||||
|
||||
# cache the vars.
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFmpeg include directories." FORCE)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFmpeg libraries." FORCE)
|
||||
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFmpeg cflags." FORCE)
|
||||
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES FFMPEG_DEFINITIONS)
|
||||
|
||||
# Now set the noncached _FOUND vars for the components.
|
||||
foreach(_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWRESAMPLE SWSCALE)
|
||||
set_component_found(${_component})
|
||||
endforeach ()
|
||||
|
||||
# Compile the list of required vars
|
||||
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
|
||||
foreach(_component ${FFmpeg_FIND_COMPONENTS})
|
||||
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
|
||||
endforeach()
|
||||
|
||||
# Give a nice error message if some of the required vars are missing.
|
||||
find_package_handle_standard_args(FFmpeg DEFAULT_MSG ${_FFmpeg_REQUIRED_VARS})
|
||||
60
externals/openal-soft/cmake/FindJACK.cmake
vendored
Normal file
60
externals/openal-soft/cmake/FindJACK.cmake
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# - Find JACK
|
||||
# Find the JACK libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# JACK_FOUND - True if JACK_INCLUDE_DIR & JACK_LIBRARY are found
|
||||
# JACK_INCLUDE_DIRS - where to find jack.h, etc.
|
||||
# JACK_LIBRARIES - the jack library
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009-2011 Kitware, Inc.
|
||||
# Copyright 2009-2011 Philip Lowman <philip@yhbt.com>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# * The names of Kitware, Inc., the Insight Consortium, or the names of
|
||||
# any consortium members, or of any contributors, may not be used to
|
||||
# endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
find_path(JACK_INCLUDE_DIR NAMES jack/jack.h
|
||||
DOC "The JACK include directory"
|
||||
)
|
||||
|
||||
find_library(JACK_LIBRARY NAMES jack
|
||||
DOC "The JACK library"
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(JACK REQUIRED_VARS JACK_LIBRARY JACK_INCLUDE_DIR)
|
||||
|
||||
if(JACK_FOUND)
|
||||
set(JACK_LIBRARIES ${JACK_LIBRARY})
|
||||
set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY)
|
||||
81
externals/openal-soft/cmake/FindMySOFA.cmake
vendored
Normal file
81
externals/openal-soft/cmake/FindMySOFA.cmake
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
# - Find MySOFA
|
||||
# Find the MySOFA libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# MYSOFA_FOUND - True if MYSOFA_INCLUDE_DIR & MYSOFA_LIBRARY are found
|
||||
# MYSOFA_INCLUDE_DIRS - where to find mysofa.h, etc.
|
||||
# MYSOFA_LIBRARIES - the MySOFA library
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009-2011 Kitware, Inc.
|
||||
# Copyright 2009-2011 Philip Lowman <philip@yhbt.com>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# * The names of Kitware, Inc., the Insight Consortium, or the names of
|
||||
# any consortium members, or of any contributors, may not be used to
|
||||
# endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
find_package(ZLIB)
|
||||
|
||||
find_path(MYSOFA_INCLUDE_DIR NAMES mysofa.h
|
||||
DOC "The MySOFA include directory"
|
||||
)
|
||||
|
||||
find_library(MYSOFA_LIBRARY NAMES mysofa
|
||||
DOC "The MySOFA library"
|
||||
)
|
||||
|
||||
find_library(MYSOFA_M_LIBRARY NAMES m
|
||||
DOC "The math library for MySOFA"
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set MYSOFA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MySOFA REQUIRED_VARS MYSOFA_LIBRARY MYSOFA_INCLUDE_DIR ZLIB_FOUND)
|
||||
|
||||
if(MYSOFA_FOUND)
|
||||
set(MYSOFA_INCLUDE_DIRS ${MYSOFA_INCLUDE_DIR})
|
||||
set(MYSOFA_LIBRARIES ${MYSOFA_LIBRARY})
|
||||
set(MYSOFA_LIBRARIES ${MYSOFA_LIBRARIES} ZLIB::ZLIB)
|
||||
if(MYSOFA_M_LIBRARY)
|
||||
set(MYSOFA_LIBRARIES ${MYSOFA_LIBRARIES} ${MYSOFA_M_LIBRARY})
|
||||
endif()
|
||||
|
||||
add_library(MySOFA::MySOFA UNKNOWN IMPORTED)
|
||||
set_property(TARGET MySOFA::MySOFA PROPERTY
|
||||
IMPORTED_LOCATION ${MYSOFA_LIBRARY})
|
||||
set_target_properties(MySOFA::MySOFA PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${MYSOFA_INCLUDE_DIRS}
|
||||
INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
|
||||
if(MYSOFA_M_LIBRARY)
|
||||
set_property(TARGET MySOFA::MySOFA APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${MYSOFA_M_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MYSOFA_INCLUDE_DIR MYSOFA_LIBRARY)
|
||||
33
externals/openal-soft/cmake/FindOSS.cmake
vendored
Normal file
33
externals/openal-soft/cmake/FindOSS.cmake
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# - Find OSS includes
|
||||
#
|
||||
# OSS_FOUND - True if OSS_INCLUDE_DIR is found
|
||||
# OSS_INCLUDE_DIRS - Set when OSS_INCLUDE_DIR is found
|
||||
# OSS_LIBRARIES - Set when OSS_LIBRARY is found
|
||||
#
|
||||
# OSS_INCLUDE_DIR - where to find sys/soundcard.h, etc.
|
||||
# OSS_LIBRARY - where to find libossaudio (optional).
|
||||
#
|
||||
|
||||
find_path(OSS_INCLUDE_DIR
|
||||
NAMES sys/soundcard.h
|
||||
DOC "The OSS include directory"
|
||||
)
|
||||
|
||||
find_library(OSS_LIBRARY
|
||||
NAMES ossaudio
|
||||
DOC "Optional OSS library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OSS REQUIRED_VARS OSS_INCLUDE_DIR)
|
||||
|
||||
if(OSS_FOUND)
|
||||
set(OSS_INCLUDE_DIRS ${OSS_INCLUDE_DIR})
|
||||
if(OSS_LIBRARY)
|
||||
set(OSS_LIBRARIES ${OSS_LIBRARY})
|
||||
else()
|
||||
unset(OSS_LIBRARIES)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OSS_INCLUDE_DIR OSS_LIBRARY)
|
||||
31
externals/openal-soft/cmake/FindOboe.cmake
vendored
Normal file
31
externals/openal-soft/cmake/FindOboe.cmake
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# - Find Oboe
|
||||
# Find the Oboe library
|
||||
#
|
||||
# This module defines the following variable:
|
||||
# OBOE_FOUND - True if Oboe was found
|
||||
#
|
||||
# This module defines the following target:
|
||||
# oboe::oboe - Import target for linking Oboe to a project
|
||||
#
|
||||
|
||||
find_path(OBOE_INCLUDE_DIR NAMES oboe/Oboe.h
|
||||
DOC "The Oboe include directory"
|
||||
)
|
||||
|
||||
find_library(OBOE_LIBRARY NAMES oboe
|
||||
DOC "The Oboe library"
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OBOE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Oboe REQUIRED_VARS OBOE_LIBRARY OBOE_INCLUDE_DIR)
|
||||
|
||||
if(OBOE_FOUND)
|
||||
add_library(oboe::oboe UNKNOWN IMPORTED)
|
||||
set_target_properties(oboe::oboe PROPERTIES
|
||||
IMPORTED_LOCATION ${OBOE_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${OBOE_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OBOE_INCLUDE_DIR OBOE_LIBRARY)
|
||||
63
externals/openal-soft/cmake/FindOpenSL.cmake
vendored
Normal file
63
externals/openal-soft/cmake/FindOpenSL.cmake
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
# - Find OpenSL
|
||||
# Find the OpenSL libraries
|
||||
#
|
||||
# This module defines the following variables and targets:
|
||||
# OPENSL_FOUND - True if OPENSL was found
|
||||
# OpenSL::OpenSLES - The OpenSLES target
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009-2011 Kitware, Inc.
|
||||
# Copyright 2009-2011 Philip Lowman <philip@yhbt.com>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# * The names of Kitware, Inc., the Insight Consortium, or the names of
|
||||
# any consortium members, or of any contributors, may not be used to
|
||||
# endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
find_path(OPENSL_INCLUDE_DIR NAMES SLES/OpenSLES.h
|
||||
DOC "The OpenSL include directory")
|
||||
find_path(OPENSL_ANDROID_INCLUDE_DIR NAMES SLES/OpenSLES_Android.h
|
||||
DOC "The OpenSL Android include directory")
|
||||
|
||||
find_library(OPENSL_LIBRARY NAMES OpenSLES
|
||||
DOC "The OpenSL library")
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENSL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenSL REQUIRED_VARS OPENSL_LIBRARY OPENSL_INCLUDE_DIR
|
||||
OPENSL_ANDROID_INCLUDE_DIR)
|
||||
|
||||
if(OPENSL_FOUND)
|
||||
add_library(OpenSL::OpenSLES UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenSL::OpenSLES PROPERTIES
|
||||
IMPORTED_LOCATION ${OPENSL_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${OPENSL_INCLUDE_DIR}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${OPENSL_ANDROID_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OPENSL_INCLUDE_DIR OPENSL_ANDROID_INCLUDE_DIR OPENSL_LIBRARY)
|
||||
32
externals/openal-soft/cmake/FindPortAudio.cmake
vendored
Normal file
32
externals/openal-soft/cmake/FindPortAudio.cmake
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# - Find PortAudio includes and libraries
|
||||
#
|
||||
# PORTAUDIO_FOUND - True if PORTAUDIO_INCLUDE_DIR & PORTAUDIO_LIBRARY
|
||||
# are found
|
||||
# PORTAUDIO_LIBRARIES - Set when PORTAUDIO_LIBRARY is found
|
||||
# PORTAUDIO_INCLUDE_DIRS - Set when PORTAUDIO_INCLUDE_DIR is found
|
||||
#
|
||||
# PORTAUDIO_INCLUDE_DIR - where to find portaudio.h, etc.
|
||||
# PORTAUDIO_LIBRARY - the portaudio library
|
||||
#
|
||||
|
||||
find_path(PORTAUDIO_INCLUDE_DIR
|
||||
NAMES portaudio.h
|
||||
DOC "The PortAudio include directory"
|
||||
)
|
||||
|
||||
find_library(PORTAUDIO_LIBRARY
|
||||
NAMES portaudio
|
||||
DOC "The PortAudio library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PortAudio
|
||||
REQUIRED_VARS PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(PORTAUDIO_FOUND)
|
||||
set(PORTAUDIO_LIBRARIES ${PORTAUDIO_LIBRARY})
|
||||
set(PORTAUDIO_INCLUDE_DIRS ${PORTAUDIO_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PORTAUDIO_INCLUDE_DIR PORTAUDIO_LIBRARY)
|
||||
34
externals/openal-soft/cmake/FindPulseAudio.cmake
vendored
Normal file
34
externals/openal-soft/cmake/FindPulseAudio.cmake
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# - Find PulseAudio includes and libraries
|
||||
#
|
||||
# PULSEAUDIO_FOUND - True if PULSEAUDIO_INCLUDE_DIR &
|
||||
# PULSEAUDIO_LIBRARY are found
|
||||
#
|
||||
# PULSEAUDIO_INCLUDE_DIR - where to find pulse/pulseaudio.h, etc.
|
||||
# PULSEAUDIO_LIBRARY - the pulse library
|
||||
# PULSEAUDIO_VERSION_STRING - the version of PulseAudio found
|
||||
#
|
||||
|
||||
find_path(PULSEAUDIO_INCLUDE_DIR
|
||||
NAMES pulse/pulseaudio.h
|
||||
DOC "The PulseAudio include directory"
|
||||
)
|
||||
|
||||
find_library(PULSEAUDIO_LIBRARY
|
||||
NAMES pulse
|
||||
DOC "The PulseAudio library"
|
||||
)
|
||||
|
||||
if(PULSEAUDIO_INCLUDE_DIR AND EXISTS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h")
|
||||
file(STRINGS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h" pulse_version_str
|
||||
REGEX "^#define[\t ]+pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\)")
|
||||
|
||||
string(REGEX REPLACE "^.*pa_get_headers_version\\(\\)[\t ]+\\(\"([^\"]*)\"\\).*$" "\\1"
|
||||
PULSEAUDIO_VERSION_STRING "${pulse_version_str}")
|
||||
unset(pulse_version_str)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PulseAudio
|
||||
REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR
|
||||
VERSION_VAR PULSEAUDIO_VERSION_STRING
|
||||
)
|
||||
25
externals/openal-soft/cmake/FindSndFile.cmake
vendored
Normal file
25
externals/openal-soft/cmake/FindSndFile.cmake
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# - Try to find SndFile
|
||||
# Once done this will define
|
||||
#
|
||||
# SNDFILE_FOUND - system has SndFile
|
||||
# SndFile::SndFile - the SndFile target
|
||||
#
|
||||
|
||||
find_path(SNDFILE_INCLUDE_DIR NAMES sndfile.h)
|
||||
|
||||
find_library(SNDFILE_LIBRARY NAMES sndfile sndfile-1)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SndFile DEFAULT_MSG SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
|
||||
|
||||
if(SNDFILE_FOUND)
|
||||
add_library(SndFile::SndFile UNKNOWN IMPORTED)
|
||||
set_target_properties(SndFile::SndFile PROPERTIES
|
||||
IMPORTED_LOCATION ${SNDFILE_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${SNDFILE_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# show the SNDFILE_INCLUDE_DIR and SNDFILE_LIBRARY variables only in the advanced view
|
||||
mark_as_advanced(SNDFILE_INCLUDE_DIR SNDFILE_LIBRARY)
|
||||
32
externals/openal-soft/cmake/FindSoundIO.cmake
vendored
Normal file
32
externals/openal-soft/cmake/FindSoundIO.cmake
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# - Find SoundIO (sndio) includes and libraries
|
||||
#
|
||||
# SOUNDIO_FOUND - True if SOUNDIO_INCLUDE_DIR & SOUNDIO_LIBRARY are
|
||||
# found
|
||||
# SOUNDIO_LIBRARIES - Set when SOUNDIO_LIBRARY is found
|
||||
# SOUNDIO_INCLUDE_DIRS - Set when SOUNDIO_INCLUDE_DIR is found
|
||||
#
|
||||
# SOUNDIO_INCLUDE_DIR - where to find sndio.h, etc.
|
||||
# SOUNDIO_LIBRARY - the sndio library
|
||||
#
|
||||
|
||||
find_path(SOUNDIO_INCLUDE_DIR
|
||||
NAMES sndio.h
|
||||
DOC "The SoundIO include directory"
|
||||
)
|
||||
|
||||
find_library(SOUNDIO_LIBRARY
|
||||
NAMES sndio
|
||||
DOC "The SoundIO library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SoundIO
|
||||
REQUIRED_VARS SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(SOUNDIO_FOUND)
|
||||
set(SOUNDIO_LIBRARIES ${SOUNDIO_LIBRARY})
|
||||
set(SOUNDIO_INCLUDE_DIRS ${SOUNDIO_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SOUNDIO_INCLUDE_DIR SOUNDIO_LIBRARY)
|
||||
12
externals/openal-soft/cmake/bin2h.script.cmake
vendored
Normal file
12
externals/openal-soft/cmake/bin2h.script.cmake
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Read the input file into 'indata', converting each byte to a pair of hex
|
||||
# characters
|
||||
file(READ "${INPUT_FILE}" indata HEX)
|
||||
|
||||
# For each pair of characters, indent them and prepend the 0x prefix, and
|
||||
# append a comma separateor.
|
||||
# TODO: Prettify this. Should group a number of bytes per line instead of one
|
||||
# per line.
|
||||
string(REGEX REPLACE "(..)" " 0x\\1,\n" output "${indata}")
|
||||
|
||||
# Write the list of hex chars to the output file
|
||||
file(WRITE "${OUTPUT_FILE}" "${output}")
|
||||
Reference in New Issue
Block a user