FindSDL_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_LIBRARIES,其中包含 SDL_SOUND_LIBRARY 和其他音频库(如果需要),以便在你的系统上成功编译。
响应 $SDLDIR 和 $SDLSOUNDDIR 环境变量,这对应于在构建 SDL 中使用的 ./configure --prefix=$SDLDIR。
在 OSX 上,它将优先于其他库选择 Framework 版本(如果找到的话)。人们将不得不手动更改 SDL_LIBRARY 的高速缓存值,以覆盖此选定信息,或设置 CMake 环境 CMAKE_INCLUDE_PATH 以修改搜索路径。