W3cubDocs

/CMake 3.19

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:

  1. System framework: /System/Library/Frameworks, whose priority can be changed via setting the CMAKE_FIND_FRAMEWORK variable.
  2. Environment variable $OPENALDIR.
  3. System paths.
  4. User-compiled framework: ~/Library/Frameworks.
  5. Manually compiled framework: /Library/Frameworks.
  6. Add-on package: /opt.

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

© 2000–2020 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.19/module/FindOpenAL.html