Update CMake integration for Opus

This commit is contained in:
Lukas Dürrenberger 2020-11-18 20:16:37 +01:00
parent 8774acddb1
commit baa8a3f1e4
2 changed files with 3 additions and 2 deletions

View file

@ -73,7 +73,7 @@ endif()
sfml_find_package(OpenAL INCLUDE "OPENAL_INCLUDE_DIR" LINK "OPENAL_LIBRARY")
sfml_find_package(VORBIS INCLUDE "VORBIS_INCLUDE_DIRS" LINK "VORBIS_LIBRARIES")
sfml_find_package(FLAC INCLUDE "FLAC_INCLUDE_DIR" LINK "FLAC_LIBRARY")
sfml_find_package(Opus INCLUDE "OPUS_INCLUDE_DIR" LINK "OPUS_LIBRARY")
sfml_find_package(Opus INCLUDE "OPUS_INCLUDE_DIRS" LINK "OPUS_LIBRARIES")
# avoids warnings in vorbisfile.h
target_compile_definitions(VORBIS INTERFACE "OV_EXCLUDE_STATIC_CALLBACKS")
@ -92,4 +92,4 @@ endif()
target_link_libraries(sfml-audio
PUBLIC sfml-system
PRIVATE VORBIS FLAC)
PRIVATE VORBIS FLAC Opus)