FindOpenAL¶
Finds Open Audio Library (OpenAL).
Projects using this module should use #include "al.h"
to include the OpenAL
header file, not #include <AL/al.h>
. The reason for this is that the
latter is not entirely portable. Windows/Creative Labs does not by default put
their headers in AL/
and macOS uses the convention <OpenAL/al.h>
.
Hints¶
Environment variable $OPENALDIR
can be used to set the prefix of OpenAL
installation to be found.
By default on macOS, system framework is search first. In other words, OpenAL is searched in the following order:
System framework:
/System/Library/Frameworks
, whose priority can be changed via setting theCMAKE_FIND_FRAMEWORK
variable.Environment variable
$OPENALDIR
.System paths.
User-compiled framework:
~/Library/Frameworks
.Manually compiled framework:
/Library/Frameworks
.Add-on package:
/opt
.
IMPORTED Targets¶
New in version 3.25.
This module defines the IMPORTED
target:
OpenAL::OpenAL
The OpenAL library, if found.
Result Variables¶
This module defines the following variables:
OPENAL_FOUND
If false, do not try to link to OpenAL
OPENAL_INCLUDE_DIR
OpenAL include directory
OPENAL_LIBRARY
Path to the OpenAL library
OPENAL_VERSION_STRING
Human-readable string containing the version of OpenAL