SDL_image: cmake: fix macho {compatibility,current} version (e2486)

From e24868e6e40f301e8f69f44fc83069cde54618ed Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 1 May 2024 22:01:08 +0200
Subject: [PATCH] cmake: fix macho {compatibility,current} version

---
 CMakeLists.txt | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f8cb647..a9ab6a04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -257,18 +257,14 @@ set_target_properties(SDL2_image PROPERTIES
 if(NOT ANDROID)
     set_target_properties(SDL2_image PROPERTIES
         DEBUG_POSTFIX "${SDL2IMAGE_DEBUG_POSTFIX}"
+        SOVERSION "${LT_MAJOR}"
+        VERSION "${LT_VERSION}"
     )
     if(APPLE)
         cmake_minimum_required(VERSION 3.17)
         set_target_properties(SDL2_image PROPERTIES
-            SOVERSION "${LT_MAJOR}"
             MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}"
-            MACHO_CURRENT_VERSION "${MACHO_CURRENT_VERSION}"
-        )
-    else()
-        set_target_properties(SDL2_image PROPERTIES
-            SOVERSION "${LT_MAJOR}"
-            VERSION "${LT_VERSION}"
+            MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
         )
     endif()
 endif()