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

From 2292801d084d1c5ac3d7d1dffa426ebc51721de7 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 23 Mar 2024 14:39:49 +0100
Subject: [PATCH] cmake: set MACHO_{COMPATIBILITY,CURRENT}_VERSION properties

These properties set the internal properties,
SOVERSION determines the output filename.
---
 CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d012fbc5..93ba86f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -120,11 +120,11 @@ if(NOT ANDROID)
         DEBUG_POSTFIX "${SDL2TTF_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_ttf 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_ttf PROPERTIES