SDL_mixer: cmake: use Ogg::ogg instead of Ogg::Ogg

From 3b1fc1006dede494a56fff009fae088e21ceebce Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 12 Jan 2024 19:07:34 +0100
Subject: [PATCH] cmake: use Ogg::ogg instead of Ogg::Ogg

---
 cmake/FindOgg.cmake      | 8 +++++---
 cmake/FindOpusFile.cmake | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cmake/FindOgg.cmake b/cmake/FindOgg.cmake
index ef88bff3..fa327fa5 100644
--- a/cmake/FindOgg.cmake
+++ b/cmake/FindOgg.cmake
@@ -34,9 +34,9 @@ if(Ogg_FOUND)
     if(EXISTS "${Ogg_INCLUDE_PATH}/ogg")
         list(APPEND Ogg_dirs "${Ogg_INCLUDE_PATH}/ogg")
     endif()
-    if(NOT TARGET Ogg::Ogg)
-        add_library(Ogg::Ogg UNKNOWN IMPORTED)
-        set_target_properties(Ogg::Ogg PROPERTIES
+    if(NOT TARGET Ogg::ogg)
+        add_library(Ogg::ogg UNKNOWN IMPORTED)
+        set_target_properties(Ogg::ogg PROPERTIES
             IMPORTED_LOCATION "${Ogg_LIBRARY}"
             INTERFACE_INCLUDE_DIRECTORIES "${Ogg_dirs}"
             INTERFACE_COMPILE_OPTIONS "${Ogg_COMPILE_OPTIONS}"
@@ -46,3 +46,5 @@ if(Ogg_FOUND)
         )
     endif()
 endif()
+
+set(Ogg_INCLUDE_DIRS ${Ogg_INCLUDE_PATH})
diff --git a/cmake/FindOpusFile.cmake b/cmake/FindOpusFile.cmake
index 9c48d191..410c1e17 100644
--- a/cmake/FindOpusFile.cmake
+++ b/cmake/FindOpusFile.cmake
@@ -40,7 +40,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};${Ogg_dirs}"
+            INTERFACE_INCLUDE_DIRECTORIES "${OpusFile_dirs};$<TARGET_PROPERTY:Ogg::ogg,INTERFACE_INCLUDE_DIRECTORIES>"
             INTERFACE_COMPILE_OPTIONS "${OpusFile_COMPILE_OPTIONS}"
             INTERFACE_LINK_LIBRARIES "${OpusFile_LINK_LIBRARIES}"
             INTERFACE_LINK_OPTIONS "${OpusFile_LINK_OPTIONS}"