SDL_image: cmake: set MACHO_{COMPATIBILITY,CURRENT}_VERSION properties

From 8af1c4f28edd352b2838e3f43d72a4c301499918 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 2 Apr 2024 22:25:59 +0200
Subject: [PATCH] cmake: set MACHO_{COMPATIBILITY,CURRENT}_VERSION properties

---
 CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f73e5936..1f8cb647 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -259,11 +259,11 @@ if(NOT ANDROID)
         DEBUG_POSTFIX "${SDL2IMAGE_DEBUG_POSTFIX}"
     )
     if(APPLE)
-        # the SOVERSION property corresponds to the compatibility version and VERSION corresponds to the current version
-        # https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html#mach-o-versions
+        cmake_minimum_required(VERSION 3.17)
         set_target_properties(SDL2_image PROPERTIES
-            SOVERSION "${DYLIB_COMPATIBILITY_VERSION}"
-            VERSION "${DYLIB_CURRENT_VERSION}"
+            SOVERSION "${LT_MAJOR}"
+            MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}"
+            MACHO_CURRENT_VERSION "${MACHO_CURRENT_VERSION}"
         )
     else()
         set_target_properties(SDL2_image PROPERTIES