查找SDL_sound

找到 SDL_sound 库

此模块取决于找到的 SDL,并且必须在调用 FindSDL.cmake 之后调用。

这个模块定义

SDL_SOUND_INCLUDE_DIR, where to find SDL_sound.h
SDL_SOUND_FOUND, if false, do not try to link to SDL_sound
SDL_SOUND_LIBRARIES, this contains the list of libraries that you need
  to link against.
SDL_SOUND_EXTRAS, this is an optional variable for you to add your own
  flags to SDL_SOUND_LIBRARIES. This is prepended to SDL_SOUND_LIBRARIES.
  This is available mostly for cases this module failed to anticipate for
  and you must add additional flags. This is marked as ADVANCED.
SDL_SOUND_VERSION_STRING, human-readable string containing the
  version of SDL_sound

这个模块也定义了(但你不应该直接使用)

SDL_SOUND_LIBRARY, the name of just the SDL_sound library you would link
against. Use SDL_SOUND_LIBRARIES for you link instructions and not this one.

并可能根据需要定义以下内容

MIKMOD_LIBRARY
MODPLUG_LIBRARY
OGG_LIBRARY
VORBIS_LIBRARY
SMPEG_LIBRARY
FLAC_LIBRARY
SPEEX_LIBRARY

通常,您不应直接使用这些变量,而应使用包含 SDL_SOUND_LIBRARY 和其他音频库(如果需要)的 SDL_SOUND_LIBRARIES 以在您的系统上成功编译。

响应与构建 SDL 时使用的 ./configure --prefix=$SDLDIR 相对应的 $SDLDIR 和 $SDLSOUNDDIR 环境变量。

在 OSX 上,这将比其他版本更喜欢框架版本(如果找到)。人们将不得不手动更改 SDL_LIBRARY 的缓存值以覆盖此选择或设置 CMake 环境 CMAKE_INCLUDE_PATH 以修改搜索路径。