SDL_mixer: cmake: require ogg and opus in FindOpusFfile.cmake

From 0f470c41dc7eb420f9366303cc91afe26a4cc40f Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 12 Jan 2024 20:59:46 +0100
Subject: [PATCH] cmake: require ogg and opus in FindOpusFfile.cmake

---
 cmake/FindOpusFile.cmake | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmake/FindOpusFile.cmake b/cmake/FindOpusFile.cmake
index 3936bb5f..a0fe0db4 100644
--- a/cmake/FindOpusFile.cmake
+++ b/cmake/FindOpusFile.cmake
@@ -25,10 +25,11 @@ set(OpusFile_LINK_OPTIONS "${_opusfile_link_options}" CACHE STRING "Extra link f
 
 set(OpusFile_LINK_DIRECTORIES "${_opusfile_link_directories}" CACHE PATH "Extra link directories of opusfile")
 
+find_package(Ogg)
 find_package(Opus)
 
 find_package_handle_standard_args(OpusFile
-    REQUIRED_VARS OpusFile_LIBRARY OpusFile_INCLUDE_PATH Opus_FOUND
+    REQUIRED_VARS OpusFile_LIBRARY OpusFile_INCLUDE_PATH Ogg_FOUND Opus_FOUND
 )
 
 if(OpusFile_FOUND)
@@ -40,7 +41,7 @@ if(OpusFile_FOUND)
         add_library(OpusFile::opusfile UNKNOWN IMPORTED)
         set_target_properties(OpusFile::opusfile PROPERTIES
             IMPORTED_LOCATION "${OpusFile_LIBRARY}"
-            INTERFACE_INCLUDE_DIRECTORIES "${OpusFile_dirs};$<TARGET_PROPERTY:Opus::opus,INTERFACE_INCLUDE_DIRECTORIES>"
+            INTERFACE_INCLUDE_DIRECTORIES "${OpusFile_dirs};$<TARGET_PROPERTY:Ogg::ogg,INTERFACE_INCLUDE_DIRECTORIES>;$<TARGET_PROPERTY:Opus::opus,INTERFACE_INCLUDE_DIRECTORIES>"
             INTERFACE_COMPILE_OPTIONS "${OpusFile_COMPILE_OPTIONS}"
             INTERFACE_LINK_LIBRARIES "${OpusFile_LINK_LIBRARIES}"
             INTERFACE_LINK_OPTIONS "${OpusFile_LINK_OPTIONS}"