[sdl2-mixer]Fix build error with feature opusfile. (#6929)

This commit is contained in:
JackBoosY 2019-06-18 08:12:00 +08:00 committed by Phil Christensen
parent f10cfbe064
commit 0b24f31aad
2 changed files with 4 additions and 2 deletions

View File

@ -49,9 +49,11 @@ endif()
# Opus support
if(SDL_MIXER_ENABLE_OPUS)
find_path(OPUS_INCLUDE_DIR opus/opusfile.h)
find_package(ogg CONFIG REQUIRED)
find_package(Opus CONFIG REQUIRED)
find_library(OPUSFILE_LIBRARY opusfile)
list(APPEND SDL_MIXER_INCLUDES ${OPUS_INCLUDE_DIR})
list(APPEND SDL_MIXER_LIBRARIES ${OPUSFILE_LIBRARY})
list(APPEND SDL_MIXER_LIBRARIES ${OPUSFILE_LIBRARY} Ogg::ogg Opus::opus)
list(APPEND SDL_MIXER_DEFINES MUSIC_OPUS)
endif()

View File

@ -1,5 +1,5 @@
Source: sdl2-mixer
Version: 2.0.4-2
Version: 2.0.4-3
Homepage: https://www.libsdl.org/projects/SDL_mixer
Description: Multi-channel audio mixer library for SDL.
Build-Depends: sdl2