SDL_mixer: cmake: use SONAME instead of full name for shared vendored libraries (fe0a2)

From fe0a2d6de87584a1e3bb502a1bd7e040608316e1 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 5 Sep 2023 22:05:06 +0200
Subject: [PATCH] cmake: use SONAME instead of full name for shared vendored
 libraries

---
 cmake/PrivateSdlFunctions.cmake | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake
index 46e0cf17..11128945 100644
--- a/cmake/PrivateSdlFunctions.cmake
+++ b/cmake/PrivateSdlFunctions.cmake
@@ -236,7 +236,11 @@ function(target_get_dynamic_library DEST TARGET)
         else()
             message(WARNING "Unable to extract dynamic library from target=${TARGET}, type=${target_type}.")
         endif()
-        set (result "$<TARGET_FILE_NAME:${TARGET}>")
+        if(WIN32)
+          set(result "$<TARGET_FILE_NAME:${TARGET}>")
+        else()
+          set(result "$<TARGET_SONAME_FILE_NAME:${TARGET}>")
+        endif()
     endif()
     set(${DEST} ${result} PARENT_SCOPE)
 endfunction()