From baa8a3f1e45e0a2e939aee255982cc5540118dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Wed, 18 Nov 2020 20:16:37 +0100 Subject: [PATCH] Update CMake integration for Opus --- cmake/SFMLConfigDependencies.cmake.in | 1 + src/SFML/Audio/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in index c5813bd6..862ca140 100644 --- a/cmake/SFMLConfigDependencies.cmake.in +++ b/cmake/SFMLConfigDependencies.cmake.in @@ -78,6 +78,7 @@ if(SFML_STATIC_LIBRARIES) sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Vorbis" SEARCH_NAMES "vorbis") sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Ogg" SEARCH_NAMES "ogg") sfml_bind_dependency(TARGET FLAC FRIENDLY_NAME "FLAC" SEARCH_NAMES "FLAC") + sfml_bind_dependency(TARGET Opus FRIENDLY_NAME "Opus" SEARCH_NAMES "Opus") endif() if (FIND_SFML_DEPENDENCIES_NOTFOUND) diff --git a/src/SFML/Audio/CMakeLists.txt b/src/SFML/Audio/CMakeLists.txt index 88b42d03..f47567e2 100644 --- a/src/SFML/Audio/CMakeLists.txt +++ b/src/SFML/Audio/CMakeLists.txt @@ -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)