Remove custom FindOpenAL.cmake
Adjust IAXClient OpenAL backend so we can use the standard CMake finder for OpenAL (or OpenAL-soft).
This commit is contained in:
parent
5b537a176e
commit
eb82084c53
2 changed files with 4 additions and 56 deletions
12
3rdparty/iaxclient/lib/audio_openal.c
vendored
12
3rdparty/iaxclient/lib/audio_openal.c
vendored
|
@ -1,15 +1,11 @@
|
|||
#include "iaxclient_lib.h"
|
||||
|
||||
#if defined(__APPLE__) && !defined(SG_SOUND_USES_OPENALSOFT)
|
||||
#include <OpenAL/al.h>
|
||||
#include <OpenAL/alc.h>
|
||||
#elif defined(OPENALSDK)
|
||||
// changed by James Turner to use non-prefixed OpenAL include paths,
|
||||
// which is what CMake official FindOpenAL.cmake and the OpenAL-soft Config.cmake
|
||||
// expect to provide. This avoids any pre-processor logic to decide which
|
||||
// prefix is correct.
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#endif
|
||||
|
||||
struct openal_priv_data
|
||||
{
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindOpenAL
|
||||
----------
|
||||
|
||||
|
||||
Finds Open Audio Library (OpenAL).
|
||||
This module defines ``OPENAL_LIBRARY OPENAL_FOUND``, if
|
||||
false, do not try to link to OpenAL ``OPENAL_INCLUDE_DIR``, where to find
|
||||
the headers.
|
||||
|
||||
``$OPENALDIR`` is an environment variable that would correspond to the
|
||||
``./configure --prefix=$OPENALDIR`` used in building OpenAL.
|
||||
|
||||
Created by Eric Wing. This was influenced by the ``FindSDL.cmake``
|
||||
module.
|
||||
#]=======================================================================]
|
||||
|
||||
# Modifed for FlightGear by James Turner
|
||||
# We want to use the 'parented' directories here, unlike the standard CMake version
|
||||
# of this.
|
||||
|
||||
if (OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
|
||||
# already set, do nothing
|
||||
else()
|
||||
find_path(OPENAL_INCLUDE_DIR OpenAL/al.h AL/al.h
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATH_SUFFIXES include
|
||||
PATHS
|
||||
/opt
|
||||
)
|
||||
|
||||
find_library(OPENAL_LIBRARY
|
||||
NAMES OpenAL al openal OpenAL32
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATH_SUFFIXES libx32 lib64 lib libs64 libs
|
||||
PATHS
|
||||
/opt
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
||||
endif()
|
Loading…
Add table
Reference in a new issue