From 780bf0f6d183e200e31e7b81c96eaa4144acf20c Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 2 Apr 2024 22:27:51 +0200
Subject: [PATCH] cmake: set MACHO_{COMPATIBILITY,CURRENT}_VERSION properties
(cherry picked from commit f15c2b873d6b9379080b187d25ca48cd69948bb4)
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b14bb2448..bf1279911 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -271,11 +271,11 @@ if(NOT ANDROID)
DEBUG_POSTFIX "${SDL2MIXER_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_mixer 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_mixer PROPERTIES