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 以修改搜尋路徑。