From 75ae0a70ec1e93b209422801d58f92dc5950fe6a 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
(cherry picked from commit 8af1c4f28edd352b2838e3f43d72a4c301499918)
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58736d92..38f4e8e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -251,11 +251,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